Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
App is a wrapper around fx.App that provides some testing helpers. By default, it uses the provided TB as the application's logging backend.
type Lifecycle ¶
type Lifecycle struct {
// contains filtered or unexported fields
}
Lifecycle is a testing spy for fx.Lifecycle. It exposes Start and Stop methods (and some test-specific helpers) so that unit tests can exercise hooks.
func (*Lifecycle) MustStart ¶
MustStart calls Start with context.Background(), failing the test if an error is encountered.
func (*Lifecycle) MustStop ¶
func (l *Lifecycle) MustStop()
MustStop calls Stop with context.Background(), failing the test if an error is encountered.
func (*Lifecycle) Start ¶
Start executes all registered OnStart hooks in order, halting at the first hook that doesn't succeed.
Click to show internal directories.
Click to hide internal directories.