Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // BlueGreenControllerEnabled indicates whether the blue-green controller // should be enabled in the controller manager for tests in this suite. BlueGreenControllerEnabled = strings.ToLower(os.Getenv("KONG_OPERATOR_BLUEGREEN_CONTROLLER")) == "true" )
Functions ¶
func GetClients ¶ added in v2.1.1
func GetClients() testutils.K8sClients
GetClients returns the Kubernetes clients used by the test suite. It allows interaction in tests with environment bootstrapped by TestMain.
func GetCtx ¶ added in v2.1.1
GetCtx returns the context used by the test suite. It allows interaction in tests with environment bootstrapped by TestMain.
func GetEnv ¶ added in v2.1.1
func GetEnv() environments.Environment
GetEnv returns the environment used by the test suite. It allows interaction in tests with environment bootstrapped by TestMain.
func GetKongPluginImageRegistryCredentialsForTests ¶
func GetKongPluginImageRegistryCredentialsForTests() string
GetKongPluginImageRegistryCredentialsForTests returns the credentials for the image registry with plugins for tests. The expected format is the same as ~/.docker/config.json, see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#log-in-to-docker-hub
func Suite ¶ added in v2.1.1
func Suite(m *testing.M, opts ...SuiteOption)
Suite sets up the testing environment for the integration test suite. It is intended to be called from TestMain in the respective test package.
Types ¶
type SuiteOption ¶ added in v2.3.0
type SuiteOption func(*suiteOptions)
SuiteOption configures optional behavior of Suite.
func WithKongLicense ¶ added in v2.3.0
func WithKongLicense() SuiteOption
WithKongLicense loads license data from the KONG_LICENSE_DATA environment variable into the test cluster by creating a KongLicense resource. If not set, the test suite will exit with an error.