integration

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: Apache-2.0 Imports: 73 Imported by: 0

Documentation

Overview

Code generated by hack/generators/testcases-registration/main.go. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultControllerConfigForTests

func DefaultControllerConfigForTests() manager.Config

DefaultControllerConfigForTests returns a default configuration for the controller manager used in tests. It can be adjusted by overriding arbitrary fields in the returned config.

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 added in v1.6.1

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

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

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

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 added in v1.4.0

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 GetTestSuite

func GetTestSuite() []func(*testing.T)

GetTestSuite returns all integration tests that should be run.

func GetVolumeByName

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

func GetVolumeMountsByVolumeName

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

func KonnectEntitiesTestCase added in v1.6.0

func KonnectEntitiesTestCase(t *testing.T, params konnectEntitiesTestCaseParams)

func KonnectExtensionTestCases added in v1.6.0

func KonnectExtensionTestCases(t *testing.T, params KonnectExtensionTestCaseParams)

func TestAIGatewayCreation

func TestAIGatewayCreation(t *testing.T)

func TestControlPlaneEssentials

func TestControlPlaneEssentials(t *testing.T)

func TestControlPlaneUpdate

func TestControlPlaneUpdate(t *testing.T)

func TestControlPlaneWatchNamespaces added in v1.6.0

func TestControlPlaneWatchNamespaces(t *testing.T)

func TestControlPlaneWhenNoDataPlane

func TestControlPlaneWhenNoDataPlane(t *testing.T)

func TestDataPlaneBlueGreenHorizontalScaling

func TestDataPlaneBlueGreenHorizontalScaling(t *testing.T)

func TestDataPlaneBlueGreenResourcesNotDeletedUntilOwnerIsRemoved added in v1.6.0

func TestDataPlaneBlueGreenResourcesNotDeletedUntilOwnerIsRemoved(t *testing.T)

func TestDataPlaneBlueGreenRollout

func TestDataPlaneBlueGreenRollout(t *testing.T)

func TestDataPlaneEssentials

func TestDataPlaneEssentials(t *testing.T)

func TestDataPlaneHorizontalScaling

func TestDataPlaneHorizontalScaling(t *testing.T)

func TestDataPlanePodDisruptionBudget added in v1.4.0

func TestDataPlanePodDisruptionBudget(t *testing.T)

func TestDataPlaneScaleSubresource added in v1.6.0

func TestDataPlaneScaleSubresource(t *testing.T)

TestDataPlaneScaleSubresource tests the scale subresource of the DataPlane CRD. It verifies that when a deployment is restarted using kubectl rollout restart, the new ReplicaSet maintains the correct replica count.

func TestDataPlaneServiceExternalTrafficPolicy added in v1.4.0

func TestDataPlaneServiceExternalTrafficPolicy(t *testing.T)

func TestDataPlaneServiceTypes added in v1.6.0

func TestDataPlaneServiceTypes(t *testing.T)

func TestDataPlaneSpecifyingServiceName added in v1.5.0

func TestDataPlaneSpecifyingServiceName(t *testing.T)

func TestDataPlaneUpdate

func TestDataPlaneUpdate(t *testing.T)

func TestDataPlaneValidation

func TestDataPlaneValidation(t *testing.T)

func TestDataPlaneVolumeMounts

func TestDataPlaneVolumeMounts(t *testing.T)

func TestGatewayClassCreation

func TestGatewayClassCreation(t *testing.T)

func TestGatewayClassUpdates

func TestGatewayClassUpdates(t *testing.T)

func TestGatewayConfigurationEssentials

func TestGatewayConfigurationEssentials(t *testing.T)

func TestGatewayConfigurationServiceName added in v1.6.0

func TestGatewayConfigurationServiceName(t *testing.T)

func TestGatewayDataPlaneNetworkPolicy

func TestGatewayDataPlaneNetworkPolicy(t *testing.T)

func TestGatewayEssentials

func TestGatewayEssentials(t *testing.T)

func TestGatewayMultiple

func TestGatewayMultiple(t *testing.T)

TestGatewayMultiple checks essential Gateway behavior with multiple Gateways of the same class. Ensure DataPlanes only serve routes attached to their Gateway.

func TestGatewayWithMultipleListeners

func TestGatewayWithMultipleListeners(t *testing.T)

func TestHTTPRoute added in v1.2.2

func TestHTTPRoute(t *testing.T)

func TestHTTPRouteWithTLS added in v1.2.2

func TestHTTPRouteWithTLS(t *testing.T)

func TestIngressEssentials

func TestIngressEssentials(t *testing.T)

func TestKongPluginInstallationEssentials added in v1.4.0

func TestKongPluginInstallationEssentials(t *testing.T)

func TestKonnectEntities added in v1.4.0

func TestKonnectEntities(t *testing.T)

func TestKonnectExtension added in v1.5.0

func TestKonnectExtension(t *testing.T)

func TestKonnectExtensionKonnectControlPlaneNotFound added in v1.5.1

func TestKonnectExtensionKonnectControlPlaneNotFound(t *testing.T)

func TestMain

func TestMain(
	m *testing.M,
	setUpAndRunManager SetUpAndRunManagerFunc,
)

TestMain is the entrypoint for the integration test suite. It bootstraps the testing environment and runs the test suite on instance of KGO constructed by the argument setUpAndRunManager. This callback is called, when the whole cluster is ready and the controller manager can be started. Thus it can be used e.g. to apply additional resources to the cluster too.

func TestManualGatewayUpgradesAndDowngrades

func TestManualGatewayUpgradesAndDowngrades(t *testing.T)

func TestScalingDataPlaneThroughGatewayConfiguration

func TestScalingDataPlaneThroughGatewayConfiguration(t *testing.T)

func URLForService

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

Types

type KonnectExtensionTestBodyParams added in v1.5.0

type KonnectExtensionTestBodyParams struct {
	KonnectExtensionTestCaseParams
	// contains filtered or unexported fields
}

KonnectExtensionTestBodyParams is a struct that holds the parameters for the test body function.

type KonnectExtensionTestCaseParams added in v1.6.0

type KonnectExtensionTestCaseParams struct {
	// contains filtered or unexported fields
}

type SetUpAndRunManagerFunc

type SetUpAndRunManagerFunc func(startedChan chan struct{}) error

SetUpAndRunManagerFunc is the type of the callback that is passed to TestMain. This id called to set up and run the controller manager. Returned error should be a result of calling manager.Run.

Jump to

Keyboard shortcuts

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