Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunWithEnvironment ¶
func RunWithEnvironment(m *testing.M, opts ...EnvironmentOpt) int
RunWithEnvironment runs a suite of tests with an envtest that is shared across all tests We use testing.M as the input to avoid having this called directly from a test This ensures the envtest setup is always run from a TestMain
Types ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func (*Environment) APIReader ¶
func (e *Environment) APIReader() client.Reader
APIReader returns a non cached reader client
func (*Environment) Client ¶
func (e *Environment) Client() client.Client
func (*Environment) CreateNamespaceForTest ¶
type EnvironmentOpt ¶
type EnvironmentOpt func(ctx context.Context, e *Environment)
func WithAssignment ¶
func WithAssignment(envRef **Environment) EnvironmentOpt
Click to show internal directories.
Click to hide internal directories.