Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManagerDelegatingClientFunc ¶
func ManagerDelegatingClientFunc(cache cache.Cache, config *rest.Config, options client.Options) (client.Client, error)
NewDelegatingClientFunc returns a manager.NewClientFunc to be used when creating a new controller runtime manager.
A delegating client reads from the cache and writes directly to the server. This avoids getting unstructured objects directly from the server
See issue: https://github.com/kubernetes-sigs/cluster-api/issues/1663
Types ¶
type TestEnvironment ¶
type TestEnvironment struct { manager.Manager client.Client Config *rest.Config Log logr.Logger LogRecorder *record.Logger // contains filtered or unexported fields }
TestEnvironment encapsulates a Kubernetes local test environment.
func NewTestEnvironment ¶
func NewTestEnvironment() *TestEnvironment
NewTestEnvironment creates a new environment spinning up a local api-server.
This function should be called only once for each package you're running tests within, usually the environment is initialized in a suite_test.go file within a `BeforeSuite` ginkgo block.
func (*TestEnvironment) StartManager ¶
func (t *TestEnvironment) StartManager() error
func (*TestEnvironment) Stop ¶
func (t *TestEnvironment) Stop() error