testenv

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterLoadImages

func ClusterLoadImages() string

ClusterLoadImages loads images into test clusters when set.

func ClusterProvider

func ClusterProvider() string

ClusterProvider indicates the Kubernetes cluster provider.

func ClusterVersion

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

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 ControllerImage

func ControllerImage() string

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

func ControllerImageTag

func ControllerImageTag() string

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

func ControllerTag

func ControllerTag() string

ControllerTag is the Kong image tag to use in tests.

func EnvironmentReadyTimeout

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 GKEClusterReleaseChannel added in v3.1.0

func GKEClusterReleaseChannel() string

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

func GetDependencyVersion added in v3.1.0

func GetDependencyVersion(path string) (string, error)

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

func GetFeatureGates added in v3.1.0

func GetFeatureGates() string

func GithubRepo

func GithubRepo() string

GithubRepo returns a Github repository from a Github Actions environment.

func GithubRunID

func GithubRunID() string

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

func GithubServerURL

func GithubServerURL() string

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

func IsCI

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

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 KongHelmChartVersion

func KongHelmChartVersion() string

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

func KongImage

func KongImage() string

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

func KongImageTag

func KongImageTag() string

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

func KongLicenseData added in v3.3.0

func KongLicenseData() string

KongLicenseData returns the Kong license data to use in tests.

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() 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

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

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