integration

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expect404WithNoRouteFunc

func Expect404WithNoRouteFunc(t *testing.T, ctx context.Context, url string) func() bool

Expect404WithNoRouteFunc is used to check whether a given URL responds with 404 and a standard Kong no route message.

func FindDataPlaneReplicaSetNewerThan

func FindDataPlaneReplicaSetNewerThan(
	t *testing.T,
	ctx context.Context,
	cli client.Client,
	creationTime time.Time,
	namespace string,
	dp *operatorv1beta1.DataPlane,
) *appsv1.ReplicaSet

FindDataPlaneReplicaSetNewerThan finds a ReplicaSet created after or at the specified time. This helper logs detailed information about ReplicaSets found to help with debugging timestamp issues.

It will return nil if no ReplicaSet is found or if there's an error listing ReplicaSets. If multiple ReplicaSets are found that were created after or at the specified time, it will fail the test immediately with t.FailNow(). It succeed when exactly 1 matching ReplicaSet is found.

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

func GetCtx() context.Context

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 GetEnvValueByName

func GetEnvValueByName(envs []corev1.EnvVar, name string) string

GetEnvValueByName returns the corresponding value of LAST item with given name. returns empty string if the name not appeared.

func GetEnvValueFromByName

func GetEnvValueFromByName(envs []corev1.EnvVar, name string) *corev1.EnvVarSource

GetEnvValueFromByName returns the corresponding ValueFrom pointer of LAST item with given name. returns nil if the name not appeared.

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 GetVolumeByName

func GetVolumeByName(volumes []corev1.Volume, name string) *corev1.Volume

func GetVolumeMountsByVolumeName

func GetVolumeMountsByVolumeName(volumeMounts []corev1.VolumeMount, name string) []corev1.VolumeMount

func Suite added in v2.1.1

func Suite(m *testing.M)

Suite sets up the testing environment for the integration test suite. It is intended to be called from TestMain in the respective test package.

func URLForService

func URLForService(ctx context.Context, cluster clusters.Cluster, nsn types.NamespacedName, port int) (*url.URL, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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