integration

package
v1.6.1-0...-486f9dc Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 18 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 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 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