Documentation
¶
Index ¶
- func ClusterIPFamily() clusters.IPFamily
- func ConformanceGatewayType() string
- func ConformanceSkipTests() []string
- func DataPlaneImage() string
- func IsCI() bool
- func IsCalicoCNIDisabled() bool
- func IsCertManagerDisabled() bool
- func IsInstallingCRDsDisabled() bool
- func IsMetalLBDisabled() bool
- func IsTelepresenceDisabled() bool
- func IsWebhookEnabled() bool
- func KeepTestCluster() bool
- func KongLicenseData() string
- func KonnectAccessToken() string
- func KonnectServerURL() string
- func SkipCleanup() bool
- type ConformanceShard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterIPFamily ¶ added in v2.4.0
ClusterIPFamily returns the IP family a newly created KIND test cluster should be configured with. It reads the KONG_TEST_CLUSTER_IP_FAMILY environment variable ("ipv4", "ipv6", or "dual"), defaulting to clusters.IPv4 when unset or unrecognized.
This only takes effect when a new KIND cluster is created: KTF does not currently support configuring a non-default IP family on an existing cluster (see KONG_TEST_CLUSTER), so the setting is ignored in that case.
clusters.Dual is not yet wired up to an actual dual-stack KIND cluster build (tracked in https://github.com/Kong/kong-operator/issues/5448) - callers must reject it explicitly rather than silently falling back to IPv4 or IPv6-only.
func ConformanceGatewayType ¶ added in v2.2.0
func ConformanceGatewayType() string
ConformanceGatewayType returns the gateway type to run in conformance tests. It reads the KONG_TEST_CONFORMANCE_GATEWAY_TYPE environment variable. Valid values are "standard", "hybrid". If not set, it defaults to "standard".
func ConformanceSkipTests ¶ added in v2.3.0
func ConformanceSkipTests() []string
ConformanceSkipTests returns an extra list of conformance test short names to skip, on top of the built-in skip lists. It reads the comma separated KONG_TEST_CONFORMANCE_SKIP_TESTS environment variable, e.g. "HTTPRouteReferenceGrant,HTTPRouteRedirectPort". This lets a local run drop the gotest -run filter entirely and instead exclude flaky or undesired tests. Whitespace around each name is trimmed and empty entries are ignored.
func DataPlaneImage ¶ added in v2.2.0
func DataPlaneImage() string
DataPlaneImage returns the data plane image to use in the test environment. It reads the KONG_TEST_DATA_PLANE_IMAGE environment variable, and defaults to consts.DefaultDataPlaneImage if not set.
func IsCI ¶ added in v2.1.1
func IsCI() bool
IsCI indicates whether or not the tests are running in a CI environment.
func IsCalicoCNIDisabled ¶
func IsCalicoCNIDisabled() bool
IsCalicoCNIDisabled returns true if the Calico CNI plugin is disabled in the test environment.
func IsCertManagerDisabled ¶
func IsCertManagerDisabled() bool
IsCertManagerDisabled returns true if the Cert-Manager is disabled in the test environment.
func IsInstallingCRDsDisabled ¶
func IsInstallingCRDsDisabled() bool
IsInstallingCRDsDisabled returns true if installing CRDs is disabled in the test environment.
func IsMetalLBDisabled ¶
func IsMetalLBDisabled() bool
IsMetalLBDisabled returns true if the MetalLB is disabled in the test environment.
func IsTelepresenceDisabled ¶
func IsTelepresenceDisabled() bool
IsTelepresenceDisabled returns true if the telepresence is disabled in the test environment.
func IsWebhookEnabled ¶
func IsWebhookEnabled() bool
IsWebhookEnabled returns true if the webhook is enabled in the test environment.
func KeepTestCluster ¶ added in v2.1.1
func KeepTestCluster() bool
KeepTestCluster indicates whether the caller wants the cluster created by the test suite to persist after the test for inspection. This has no effect when an existing cluster is provided, as cleanup is not performed for existing clusters.
func KongLicenseData ¶ added in v2.3.0
func KongLicenseData() string
KongLicenseData returns the raw Kong Enterprise license JSON for the test environment, as provided by the KONG_LICENSE_DATA environment variable (e.g. by the Kong/kong-license GitHub Action). Returns an empty string if no license is configured.
func KonnectAccessToken ¶
func KonnectAccessToken() string
KonnectAccessToken returns the Konnect access token for the test environment.
func KonnectServerURL ¶
func KonnectServerURL() string
KonnectServerURL returns the Konnect server URL for the test environment.
func SkipCleanup ¶ added in v2.1.1
func SkipCleanup() bool
SkipCleanup indicates whether or not the test environment should skip cleanup, either because it's running in a CI environment or because the user has explicitly requested to keep the test cluster.
Types ¶
type ConformanceShard ¶ added in v2.4.0
ConformanceShard describes how the Gateway API conformance suite is split across test runs. The zero value means "no sharding, run the whole suite".
func ConformanceShardFromEnv ¶ added in v2.4.0
func ConformanceShardFromEnv() (ConformanceShard, error)
ConformanceShardFromEnv returns the shard of the Gateway API conformance suite to run. It reads the KONG_TEST_CONFORMANCE_SHARD environment variable in the "<index>/<total>" format, with a 1-based index, e.g. "2/4". An empty value means the whole suite is run.
Invalid values are returned as errors so that CI fails fast instead of silently running the wrong subset of tests.
func (ConformanceShard) Enabled ¶ added in v2.4.0
func (s ConformanceShard) Enabled() bool
Enabled reports whether the conformance suite should be restricted to a single shard.
func (ConformanceShard) String ¶ added in v2.4.0
func (s ConformanceShard) String() string
String returns a human readable representation of the shard.
Directories
¶
| Path | Synopsis |
|---|---|
|
crdsvalidation
|
|
|
kcfg
Package kcfg (Kubernetes configuration) is a single source of truth for common Kubernetes configuration used by tests - CRDs, RBAC, namespaces, etc.
|
Package kcfg (Kubernetes configuration) is a single source of truth for common Kubernetes configuration used by tests - CRDs, RBAC, namespaces, etc. |
|
referencegrant
Package referencegrant provides test helpers for exercising code against both ReferenceGrant API versions.
|
Package referencegrant provides test helpers for exercising code against both ReferenceGrant API versions. |
|
mocks
|
|
|
runtimeintegration
|
|
|
aigateway/containers
Package containers provides test containers for the AI Gateway contract tests, modeled on the Kong test containers in ingress-controller/test/kongintegration/containers.
|
Package containers provides test containers for the AI Gateway contract tests, modeled on the Kong test containers in ingress-controller/test/kongintegration/containers. |