Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeClientWithScheme ¶ added in v0.3.7
func NewFakeClientWithScheme(clientScheme *runtime.Scheme, initObjs ...runtime.Object) client.Client
NewFakeClientWithScheme creates a new fake client with the given scheme for testing. You can choose to initialize it with a slice of runtime.Object; all the objects with be given a fake ResourceVersion="1" so it will be possible to use optimistic lock.
Types ¶
type TestEnvironment ¶
type TestEnvironment struct { manager.Manager client.Client Config *rest.Config // 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) CreateKubeconfigSecret ¶
func (t *TestEnvironment) CreateKubeconfigSecret(cluster *clusterv1.Cluster) error
func (*TestEnvironment) StartManager ¶
func (t *TestEnvironment) StartManager() error
func (*TestEnvironment) Stop ¶
func (t *TestEnvironment) Stop() error
Click to show internal directories.
Click to hide internal directories.