Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultIsRunning ¶
DefaultIsRunning looks for lines in Fx's log output, which match either the ConsoleLogger or the ZapLogger's output, and represent that the application is running and ready to receive requests.
func Start ¶
func Start(t test.T, main func(), options ...StartOption)
Start starts the Fx application that main represents, and blocks until isRunning(line) reports true for a line of output. When the test exits, this signals for the application to stop, and waits for it to stop.
Types ¶
type StartOption ¶
type StartOption interface {
// contains filtered or unexported methods
}
StartOption is an option for the Start function.
func IsRunning ¶
func IsRunning(f func(string) bool) StartOption
IsRunning customizes how Start determines whether a log statement represents a running application.
Defaults to DefaultIsRunning.
func Timeout ¶
func Timeout(t time.Duration) StartOption
Timeout specifies the duration after which we'll stop waiting for the application to start up.
Defaults to 5s.