servicetest

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run[R Runnable](tb TestingT, r R) R

Run fails tb if the service fails to start or close.

func RunHealthy

func RunHealthy[S services.Service](tb TestingT, s S) S

RunHealthy fails tb if the service fails to start, close, is never ready, or is ever unhealthy (based on periodic checks).

  • after starting, readiness will always be checked at least once, before closing
  • if ever ready, then health will be checked at least once, before closing

Types

type Runnable

type Runnable interface {
	Start(context.Context) error
	Close() error
}

type TestingT

type TestingT interface {
	require.TestingT
	Helper()
	Cleanup(func())
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL