Documentation ¶
Overview ¶
Package helpers provides helper functions to run integration tests by pre-populating the required settings for envtest and loading required crds from different modules
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestEnvironment ¶
type TestEnvironment struct { manager.Manager client.Client Config *rest.Config ProxmoxClient proxmox.Client WebhookConfig WebhookConfig // contains filtered or unexported fields }
TestEnvironment is used to wrap the testing setup for integration tests.
func NewTestEnvironment ¶
func NewTestEnvironment(setupWebhook bool, pmClient proxmox.Client) *TestEnvironment
NewTestEnvironment creates a new testing environment with a pre-configured manager, that can be used to register reconcilers.
func (*TestEnvironment) GetContext ¶
func (t *TestEnvironment) GetContext() context.Context
GetContext returns the context of the test environment. This context will be initialized once `StartManager` was called.
func (*TestEnvironment) StartManager ¶
func (t *TestEnvironment) StartManager(ctx context.Context) error
StartManager starts the manager.
func (*TestEnvironment) Stop ¶
func (t *TestEnvironment) Stop() error
Stop shuts down the test environment and stops the manager.
type WebhookConfig ¶
WebhookConfig contains host and port for the env test webhook serving address.