Documentation
¶
Index ¶
- func Expect404WithNoRouteFunc(t *testing.T, ctx context.Context, url string) func() bool
- func FindDataPlaneReplicaSetNewerThan(t *testing.T, ctx context.Context, cli client.Client, creationTime time.Time, ...) *appsv1.ReplicaSet
- func GetClients() testutils.K8sClients
- func GetCtx() context.Context
- func GetEnv() environments.Environment
- func GetEnvValueByName(envs []corev1.EnvVar, name string) string
- func GetEnvValueFromByName(envs []corev1.EnvVar, name string) *corev1.EnvVarSource
- func GetKongPluginImageRegistryCredentialsForTests() string
- func GetVolumeByName(volumes []corev1.Volume, name string) *corev1.Volume
- func GetVolumeMountsByVolumeName(volumeMounts []corev1.VolumeMount, name string) []corev1.VolumeMount
- func Suite(m *testing.M)
- func URLForService(ctx context.Context, cluster clusters.Cluster, nsn types.NamespacedName, ...) (*url.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expect404WithNoRouteFunc ¶
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
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 ¶
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 GetVolumeMountsByVolumeName ¶
func GetVolumeMountsByVolumeName(volumeMounts []corev1.VolumeMount, name string) []corev1.VolumeMount
Types ¶
This section is empty.