Documentation
¶
Overview ¶
Code generated by hack/generators/testcases-registration/main.go. DO NOT EDIT.
Index ¶
- func DefaultControllerConfigForTests() manager.Config
- 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 GetTestSuite() []func(*testing.T)
- func GetVolumeByName(volumes []corev1.Volume, name string) *corev1.Volume
- func GetVolumeMountsByVolumeName(volumeMounts []corev1.VolumeMount, name string) []corev1.VolumeMount
- func KonnectEntitiesTestCase(t *testing.T, params konnectEntitiesTestCaseParams)
- func KonnectExtensionTestCases(t *testing.T, params KonnectExtensionTestCaseParams)
- func TestAIGatewayCreation(t *testing.T)
- func TestControlPlaneEssentials(t *testing.T)
- func TestControlPlaneUpdate(t *testing.T)
- func TestControlPlaneWatchNamespaces(t *testing.T)
- func TestControlPlaneWhenNoDataPlane(t *testing.T)
- func TestDataPlaneBlueGreenHorizontalScaling(t *testing.T)
- func TestDataPlaneBlueGreenResourcesNotDeletedUntilOwnerIsRemoved(t *testing.T)
- func TestDataPlaneBlueGreenRollout(t *testing.T)
- func TestDataPlaneEssentials(t *testing.T)
- func TestDataPlaneHorizontalScaling(t *testing.T)
- func TestDataPlanePodDisruptionBudget(t *testing.T)
- func TestDataPlaneScaleSubresource(t *testing.T)
- func TestDataPlaneServiceExternalTrafficPolicy(t *testing.T)
- func TestDataPlaneServiceTypes(t *testing.T)
- func TestDataPlaneSpecifyingServiceName(t *testing.T)
- func TestDataPlaneUpdate(t *testing.T)
- func TestDataPlaneValidation(t *testing.T)
- func TestDataPlaneVolumeMounts(t *testing.T)
- func TestGatewayClassCreation(t *testing.T)
- func TestGatewayClassUpdates(t *testing.T)
- func TestGatewayConfigurationEssentials(t *testing.T)
- func TestGatewayConfigurationServiceName(t *testing.T)
- func TestGatewayDataPlaneNetworkPolicy(t *testing.T)
- func TestGatewayEssentials(t *testing.T)
- func TestGatewayMultiple(t *testing.T)
- func TestGatewayWithMultipleListeners(t *testing.T)
- func TestHTTPRoute(t *testing.T)
- func TestHTTPRouteWithTLS(t *testing.T)
- func TestIngressEssentials(t *testing.T)
- func TestKongPluginInstallationEssentials(t *testing.T)
- func TestKonnectEntities(t *testing.T)
- func TestKonnectExtension(t *testing.T)
- func TestKonnectExtensionKonnectControlPlaneNotFound(t *testing.T)
- func TestMain(m *testing.M, setUpAndRunManager SetUpAndRunManagerFunc)
- func TestManualGatewayUpgradesAndDowngrades(t *testing.T)
- func TestScalingDataPlaneThroughGatewayConfiguration(t *testing.T)
- func URLForService(ctx context.Context, cluster clusters.Cluster, nsn types.NamespacedName, ...) (*url.URL, error)
- type KonnectExtensionTestBodyParams
- type KonnectExtensionTestCaseParams
- type SetUpAndRunManagerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultControllerConfigForTests ¶
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 ¶
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 ¶
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 ¶
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 ¶
GetTestSuite returns all integration tests that should be run.
func GetVolumeMountsByVolumeName ¶
func GetVolumeMountsByVolumeName(volumeMounts []corev1.VolumeMount, name string) []corev1.VolumeMount
func KonnectEntitiesTestCase ¶ added in v1.6.0
func KonnectExtensionTestCases ¶ added in v1.6.0
func KonnectExtensionTestCases(t *testing.T, params KonnectExtensionTestCaseParams)
func TestAIGatewayCreation ¶
func TestControlPlaneUpdate ¶
func TestControlPlaneWatchNamespaces ¶ added in v1.6.0
func TestDataPlaneBlueGreenResourcesNotDeletedUntilOwnerIsRemoved ¶ added in v1.6.0
func TestDataPlaneEssentials ¶
func TestDataPlanePodDisruptionBudget ¶ added in v1.4.0
func TestDataPlaneScaleSubresource ¶ added in v1.6.0
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 TestDataPlaneServiceTypes ¶ added in v1.6.0
func TestDataPlaneSpecifyingServiceName ¶ added in v1.5.0
func TestDataPlaneUpdate ¶
func TestDataPlaneValidation ¶
func TestGatewayClassUpdates ¶
func TestGatewayConfigurationServiceName ¶ added in v1.6.0
func TestGatewayEssentials ¶
func TestGatewayMultiple ¶
TestGatewayMultiple checks essential Gateway behavior with multiple Gateways of the same class. Ensure DataPlanes only serve routes attached to their Gateway.
func TestHTTPRoute ¶ added in v1.2.2
func TestHTTPRouteWithTLS ¶ added in v1.2.2
func TestIngressEssentials ¶
func TestKongPluginInstallationEssentials ¶ added in v1.4.0
func TestKonnectEntities ¶ added in v1.4.0
func TestKonnectExtension ¶ added in v1.5.0
func TestKonnectExtensionKonnectControlPlaneNotFound ¶ added in v1.5.1
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.
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.
Source Files
¶
- replicaset_helpers.go
- suite.go
- test_aigateway.go
- test_controlplane.go
- test_dataplane.go
- test_dataplane_bluegreen.go
- test_dataplane_scale_subresource.go
- test_gateway.go
- test_gatewayclass.go
- test_gatewayconfiguration.go
- test_gatewayconfiguration_service_name.go
- test_httproute.go
- test_ingress.go
- test_kongplugininstallation.go
- test_konnect_entities.go
- test_konnect_extension.go
- test_manual_upgrades_and_downgrades.go
- test_validating.go
- utils.go
- zz_generated.registered_testcases.go