testenv

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterLoadImages added in v2.2.0

func ClusterLoadImages() string

ClusterLoadImages loads images into test clusters when set.

func ClusterProvider added in v2.2.0

func ClusterProvider() string

ClusterProvider indicates the Kubernetes cluster provider.

func ClusterVersion added in v2.2.0

func ClusterVersion() string

ClusterVersion indicates the Kubernetes cluster version to use when generating a testing environment (if the cluster was not provided by the caller). and allows the caller to provide a specific version.

If no version is provided the default version for the cluster provisioner in the testing framework will be used.

func ControllerFeatureGates added in v2.2.0

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.2.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 added in v2.2.0

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 GKEClusterReleaseChannel added in v2.2.0

func GKEClusterReleaseChannel() string

GKEClusterReleaseChannel indicates the GKE cluster release channel to use when creating a GKE cluster in tests.

func GetDependencyVersion

func GetDependencyVersion(path string) (string, error)

GetDependencyVersion returns the version of a dependency specified by the dependency tracker file given a YAML path.

func GithubRepo added in v2.2.0

func GithubRepo() string

GithubRepo returns a Github repository from a Github Actions environment.

func GithubRunID added in v2.2.0

func GithubRunID() string

GithubRunID returns a Github run ID from a Github Actions environment.

func GithubServerURL added in v2.2.0

func GithubServerURL() string

GithubServerURL returns a Github server URL from a Github Actions environment.

func IsCI added in v2.2.0

func IsCI() bool

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

func KeepTestCluster added in v2.2.0

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.2.0

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 KongEnterpriseImageUsed added in v2.3.0

func KongEnterpriseImageUsed() bool

KongEnterpriseImageUsed reports whether the Kong Gateway image configured for this test run (via TEST_KONG_IMAGE) is a Kong Enterprise image.

func KongHelmChartVersion added in v2.2.0

func KongHelmChartVersion() string

KongHelmChartVersion is the 'kong' helm chart version to use in tests.

func KongImage added in v2.2.0

func KongImage() string

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

func KongImageTag added in v2.2.0

func KongImageTag() string

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

func KongPullPassword added in v2.2.0

func KongPullPassword() string

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

func KongPullUsername added in v2.2.0

func KongPullUsername() string

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

func KongRouterFlavor added in v2.2.0

func KongRouterFlavor() dpconf.RouterFlavor

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

func KongTag added in v2.2.0

func KongTag() string

KongTag is the Kong image tag to use in tests.

func WaitForClusterDelete added in v2.2.0

func WaitForClusterDelete() bool

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

Types

type DBModeDatabase added in v2.2.0

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

func DBMode added in v2.2.0

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