testenv

package
v2.12.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterVersion

func ClusterVersion() string

ClusterVersion indicates the version of Kubernetes to use for the tests (if the cluster was not provided by the caller).

func ControllerFeatureGates

func ControllerFeatureGates() string

ControllerFeatureGates contains the feature gates that should be enabled for test runs in the controller. If none specified, we fall back to default values.

func EnvironmentReadyTimeout added in v2.10.0

func EnvironmentReadyTimeout() time.Duration

EnvironmentReadyTimeout returns the amount of time that will be given to wait for the environment ready, including all the dependencies (kong, metallb, etc) used here to make up a context to pass into environments.WaitForReady to trigger cleanup when timed out.

func ExistingClusterName

func ExistingClusterName() string

ExistingClusterName indicates whether or not the caller is providing their own cluster for running the tests. These need to come in the format <TYPE>:<NAME> (e.g. "kind:<NAME>", "gke:<NAME>", e.t.c.).

func ExpressionRoutesEnabled added in v2.12.0

func ExpressionRoutesEnabled() bool

ExpressionRoutesEnabled indicates whether or not to enable expression routes for the Kong Gateway and the controller. If none specified, we fall back to default value - traditional_compatible.

func IsCI added in v2.12.0

func IsCI() bool

IsCI indicates whether or not the tests are running in a CI environment.

func KeepTestCluster

func KeepTestCluster() string

KeepTestCluster indicates whether the caller wants the cluster created by the test suite to persist after the test for inspection. This has a nil effect when an existing cluster is provided, as cleanup is not performed for existing clusters.

func KongEffectiveVersion added in v2.11.1

func KongEffectiveVersion() string

KongEffectiveVersion is the effective semver of kong gateway. When testing against "nightly" image of kong gateway, we need to set the effective version for parsing semver in chart templates.

func KongEnterpriseEnabled

func KongEnterpriseEnabled() bool

KongEnterpriseEnabled enables Enterprise-specific tests when set to "true".

func KongImage

func KongImage() string

KongImage is the Kong image to use in lieu of the default.

func KongImageTag added in v2.12.3

func KongImageTag() string

KongImageTag is the combined Kong image and tag if both are set, or empty string if not.

func KongPullPassword

func KongPullPassword() string

KongPullPassword is the Docker password to use for the Kong image pull secret.

func KongPullUsername

func KongPullUsername() string

KongPullUsername is the Docker username to use for the Kong image pull secret.

func KongRouterFlavor

func KongRouterFlavor() string

KongRouterFlavor returns router mode of Kong in tests. Currently supports: - `traditional` - `traditional_compatible`. - `expressions` (experimental, only for testing expression route related tests).

func KongTag

func KongTag() string

KongTag is the Kong image tag to use in tests.

func WaitForClusterDelete

func WaitForClusterDelete() bool

WaitForClusterDelete indicates whether or not to wait for cluster deletion to complete.

Types

type DBModeDatabase added in v2.11.0

type DBModeDatabase string
const (
	DBModeOff      DBModeDatabase = "off"
	DBModePostgres DBModeDatabase = "postgres"
)

func DBMode

func DBMode() DBModeDatabase

DBMode indicates the database backend of the test cluster ("off" and "postgres" are supported).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL