resources

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Interval specifies the time between two polls.
	Interval = 10 * time.Second
	// Timeout specifies the timeout for the function PollImmediate to reach a certain status.
	Timeout = 5 * time.Minute
)

Variables

View Source
var (
	// ServingOperatorNamespace is the namespace for knative serving
	ServingOperatorNamespace = getenv("SERVING_NAMESPACE", "serving-test")
	// EventingOperatorNamespace is the namespace for knative eventing
	EventingOperatorNamespace = getenv("EVENTING_NAMESPACE", "eventing-test")
	// OperatorNamespace is the namespace of the Knative Operator
	OperatorNamespace = getenv("OPERATOR_NAMESPACE", "operator-test")
	// OperatorName is the name of the Knative Operator deployment
	OperatorName = "knative-operator"
	// TestKey is the key of the key-value pair for test cases
	TestKey = getenv("TEST_KEY", "test-key")
	// TestValue is the value of the key-value pair for test cases
	TestValue = getenv("TEST_VALUE", "test-value")
	// TestKeyAdditional is the additional key of the key-value pair for test cases
	TestKeyAdditional = getenv("TEST_KEY_ADDITIONAL", "test-key-additional")
	// TestValueAdditional is the additional value of the key-value pair for test cases
	TestValueAdditional = getenv("TEST_VALUE_ADDITIONAL", "test-value-additional")
	// TestReplicasNum is the number of replicas
	TestReplicasNum = getenv("REPLICA_NUM", "4")
	// TestTolerationKey is the test key for toleration
	TestTolerationKey = getenv("TOLERATION_KEY", "toleration-key")
	// TestOperation is the test operator
	TestOperation = getenv("OPERATION", "Exists")
	// TestEffect is the test effect
	TestEffect = getenv("EFFECT", "NoSchedule")
	// TestAdditionalTolerationKey is the additional test key for toleration
	TestAdditionalTolerationKey = getenv("ADDITIONAL_TOLERATION_KEY", "additional-toleration-key")
	// TestAdditionalOperation is the additional test operator
	TestAdditionalOperation = getenv("ADDITIONAL_OPERATION", "Equal")
	// TestAdditionalTolerationValue is the additional test value for toleration
	TestAdditionalTolerationValue = getenv("ADDITIONAL_TOLERATION_VALUE", "additional-toleration-value")
	// TestAdditionalEffect is the additional test effect for toleration
	TestAdditionalEffect = getenv("ADDITIONAL_EFFECT", "NoExecute")
	// TestImageUrl is the URL of the image
	TestImageUrl = getenv("IMAGE_URL", "gcr.io/knative-releases/knative.dev/eventing/cmd/controller:latest")
	// TestImageKey is the image key of the image
	TestImageKey = getenv("IMAGE_KEY", "eventing-controller")
	// TestServingImageUrl is the URL of the image
	TestServingImageUrl = getenv("SERVING_IMAGE_URL", "gcr.io/knative-releases/knative.dev/serving/cmd/controller:latest")
	// TestServingImageKey is the image key of the image
	TestServingImageKey = getenv("SERVING_IMAGE_KEY", "controller")
	// TestDefaultEventingImageUrl is the default eventing image url
	TestDefaultEventingImageUrl = getenv("DEFAULT_EVENTING_IMAGE_URL", "gcr.io/knative-releases/knative.dev/eventing/cmd/${NAME}:latest")
	// TestDefaultServingImageUrl is the default serving image url
	TestDefaultServingImageUrl = getenv("DEFAULT_SERVING_IMAGE_URL", "gcr.io/knative-releases/knative.dev/serving/cmd/${NAME}:latest")
	// TestEnvName is the name of the env var
	TestEnvName = getenv("ENV_NAME", "test-name")
	// TestEnvValue is the value of the env var
	TestEnvValue = getenv("ENV_VALUE", "test-value")
	// TestAddEnvName is the additional name of the env var
	TestAddEnvName = getenv("ADDITIONAL_ENV_NAME", "additional-test-name")
	// TestAddEnvValue is the additional value of the env var
	TestAddEnvValue = getenv("ADDITIONAL_ENV_VALUE", "additional-test-value")
)

Functions

func IsClusterRoleBindingReady

func IsClusterRoleBindingReady(s *rbacv1.ClusterRoleBinding, namespace string, err error) (bool, error)

func IsKnativeOperatorJobComplete

func IsKnativeOperatorJobComplete(s *batchv1.Job, err error) (bool, error)

func IsKnativeOperatorReady

func IsKnativeOperatorReady(s *appsv1.Deployment, err error) (bool, error)

func VerifyConfigMaps

func VerifyConfigMaps(t *testing.T, configMapData base.ConfigMapData, cmsFlags common.CMsFlags)

func VerifyConfigMapsDeletion

func VerifyConfigMapsDeletion(t *testing.T, configMapData base.ConfigMapData, cmsFlags common.CMsFlags)

func VerifyDeploymentLabels

func VerifyDeploymentLabels(t *testing.T, workloadOverride []base.WorkloadOverride, deployLabelFlags common.KeyValueFlags)

func VerifyDeploymentLabelsDelete

func VerifyDeploymentLabelsDelete(t *testing.T, workloadOverride []base.WorkloadOverride, deployLabelFlags common.KeyValueFlags)

func VerifyDeploymentOverride

func VerifyDeploymentOverride(t *testing.T, workloadOverride []base.WorkloadOverride, resourcesFlags configure.ResourcesFlags)

func VerifyDeploymentOverrideResourceDeletion

func VerifyDeploymentOverrideResourceDeletion(t *testing.T, workloadOverride []base.WorkloadOverride, resourcesFlags configure.ResourcesFlags)

func VerifyDeploymentOverrideTolerationDeletion

func VerifyDeploymentOverrideTolerationDeletion(t *testing.T, workloadOverride []base.WorkloadOverride, tolerationsFlags remove.TolerationsFlags)

func VerifyEnvVars

func VerifyEnvVars(t *testing.T, workloadOverride []base.WorkloadOverride, envVarFlags configure.EnvVarFlags)

func VerifyEnvVarsDelete

func VerifyEnvVarsDelete(t *testing.T, workloadOverride []base.WorkloadOverride, envVarFlags configure.EnvVarFlags)

func VerifyHAs

func VerifyHAs(t *testing.T, spec base.CommonSpec, haFlags configure.HAFlags)

func VerifyHAsDelete

func VerifyHAsDelete(t *testing.T, spec base.CommonSpec, haFlags configure.HAFlags)

func VerifyImages

func VerifyImages(t *testing.T, registry base.Registry, imageFlags configure.ImageFlags)

func VerifyImagesDelete

func VerifyImagesDelete(t *testing.T, registry base.Registry, imageFlags configure.ImageFlags)

func VerifyKnativeEventingConfigMaps

func VerifyKnativeEventingConfigMaps(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, cmsFlags common.CMsFlags)

func VerifyKnativeEventingConfigMapsDeletion

func VerifyKnativeEventingConfigMapsDeletion(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, cmsFlags common.CMsFlags)

func VerifyKnativeEventingEnvVars

func VerifyKnativeEventingEnvVars(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, envVarFlags configure.EnvVarFlags)

func VerifyKnativeEventingEnvVarsDeletion

func VerifyKnativeEventingEnvVarsDeletion(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, envVarFlags configure.EnvVarFlags)

func VerifyKnativeEventingExistence

func VerifyKnativeEventingExistence(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, resourcesFlags configure.ResourcesFlags)

func VerifyKnativeEventingHAs

func VerifyKnativeEventingHAs(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, haFlags configure.HAFlags)

func VerifyKnativeEventingHAsDelete

func VerifyKnativeEventingHAsDelete(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, haFlags configure.HAFlags)

func VerifyKnativeEventingImages

func VerifyKnativeEventingImages(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, imageFlags configure.ImageFlags)

func VerifyKnativeEventingImagesDelete

func VerifyKnativeEventingImagesDelete(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, imageFlags configure.ImageFlags)

func VerifyKnativeEventingLabelsDelete

func VerifyKnativeEventingLabelsDelete(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeEventingLabelsExistence

func VerifyKnativeEventingLabelsExistence(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeEventingResouceDeletion

func VerifyKnativeEventingResouceDeletion(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, resourcesFlags configure.ResourcesFlags)

func VerifyKnativeEventingServiceLabelsDelete

func VerifyKnativeEventingServiceLabelsDelete(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeEventingServiceLabelsExistence

func VerifyKnativeEventingServiceLabelsExistence(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeEventingTolerationDeletion

func VerifyKnativeEventingTolerationDeletion(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, tolerationsFlags remove.TolerationsFlags)

func VerifyKnativeEventingTolerations

func VerifyKnativeEventingTolerations(t *testing.T, clients operatorv1beta1.KnativeEventingInterface, tolerationsFlags configure.TolerationsFlags)

func VerifyKnativeServingConfigMaps

func VerifyKnativeServingConfigMaps(t *testing.T, clients operatorv1beta1.KnativeServingInterface, cmsFlags common.CMsFlags)

func VerifyKnativeServingConfigMapsDeletion

func VerifyKnativeServingConfigMapsDeletion(t *testing.T, clients operatorv1beta1.KnativeServingInterface, cmsFlags common.CMsFlags)

func VerifyKnativeServingEnvVars

func VerifyKnativeServingEnvVars(t *testing.T, clients operatorv1beta1.KnativeServingInterface, envVarFlags configure.EnvVarFlags)

func VerifyKnativeServingEnvVarsDeletion

func VerifyKnativeServingEnvVarsDeletion(t *testing.T, clients operatorv1beta1.KnativeServingInterface, envVarFlags configure.EnvVarFlags)

func VerifyKnativeServingExistence

func VerifyKnativeServingExistence(t *testing.T, clients operatorv1beta1.KnativeServingInterface, resourcesFlags configure.ResourcesFlags)

func VerifyKnativeServingHAs

func VerifyKnativeServingHAs(t *testing.T, clients operatorv1beta1.KnativeServingInterface, haFlags configure.HAFlags)

func VerifyKnativeServingHAsDelete

func VerifyKnativeServingHAsDelete(t *testing.T, clients operatorv1beta1.KnativeServingInterface, haFlags configure.HAFlags)

func VerifyKnativeServingImages

func VerifyKnativeServingImages(t *testing.T, clients operatorv1beta1.KnativeServingInterface, imageFlags configure.ImageFlags)

func VerifyKnativeServingImagesDelete

func VerifyKnativeServingImagesDelete(t *testing.T, clients operatorv1beta1.KnativeServingInterface, imageFlags configure.ImageFlags)

func VerifyKnativeServingLabelsDelete

func VerifyKnativeServingLabelsDelete(t *testing.T, clients operatorv1beta1.KnativeServingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeServingLabelsExistence

func VerifyKnativeServingLabelsExistence(t *testing.T, clients operatorv1beta1.KnativeServingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeServingResouceDeletion

func VerifyKnativeServingResouceDeletion(t *testing.T, clients operatorv1beta1.KnativeServingInterface, resourcesFlags configure.ResourcesFlags)

func VerifyKnativeServingServiceLabelsDelete

func VerifyKnativeServingServiceLabelsDelete(t *testing.T, clients operatorv1beta1.KnativeServingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeServingServiceLabelsExistence

func VerifyKnativeServingServiceLabelsExistence(t *testing.T, clients operatorv1beta1.KnativeServingInterface, deployLabelFlags common.KeyValueFlags)

func VerifyKnativeServingTolerationDeletion

func VerifyKnativeServingTolerationDeletion(t *testing.T, clients operatorv1beta1.KnativeServingInterface, tolerationsFlags remove.TolerationsFlags)

func VerifyKnativeServingTolerations

func VerifyKnativeServingTolerations(t *testing.T, clients operatorv1beta1.KnativeServingInterface, tolerationsFlags configure.TolerationsFlags)

func VerifyOperatorInstallationAlpha

func VerifyOperatorInstallationAlpha(t *testing.T, clients *test.Clients)

VerifyOperatorInstallationAlpha verifies all the Knative Operator Resources for alpha CRD version

func VerifyOperatorInstallationBeta

func VerifyOperatorInstallationBeta(t *testing.T, clients *test.Clients)

VerifyOperatorInstallationBeta verifies all the Knative Operator Resources for beta CRD version

func VerifyServiceLabels

func VerifyServiceLabels(t *testing.T, serviceOverride []base.ServiceOverride, deployLabelFlags common.KeyValueFlags)

func VerifyServiceLabelsDelete

func VerifyServiceLabelsDelete(t *testing.T, serviceOverride []base.ServiceOverride, deployLabelFlags common.KeyValueFlags)

func VerifyTolerations

func VerifyTolerations(t *testing.T, workloadOverride []base.WorkloadOverride, tolerationsFlags configure.TolerationsFlags)

func WaitForClusterRoleBinding

func WaitForClusterRoleBinding(clients kubernetes.Interface, name, namespace string,
	inState func(s *rbacv1.ClusterRoleBinding, namespace string, err error) (bool, error)) (*rbacv1.ClusterRoleBinding, error)

WaitForClusterRoleBinding waits and gets the status of the ClusterRoleBinding

func WaitForJob

func WaitForJob(clients kubernetes.Interface, prefix, namespace string,
	inState func(s *batchv1.Job, err error) (bool, error)) (*batchv1.Job, error)

WaitForJob waits and gets the status of the Job

func WaitForKnativeOperatorDeployment

func WaitForKnativeOperatorDeployment(clients kubernetes.Interface, name, namespace string,
	inState func(s *appsv1.Deployment, err error) (bool, error)) (*appsv1.Deployment, error)

WaitForKnativeOperatorDeployment waits and gets the status of the deployment for Knative Operator

func WaitForRole

func WaitForRole(clients kubernetes.Interface, name, namespace string) (*rbacv1.Role, error)

WaitForRole waits and gets the status of the Role

func WaitForRoleBinding

func WaitForRoleBinding(clients kubernetes.Interface, name, namespace string) (*rbacv1.RoleBinding, error)

WaitForRoleBinding waits and gets the status of the RoleBinding

func WaitForSecret

func WaitForSecret(clients kubernetes.Interface, name, namespace string) (*corev1.Secret, error)

WaitForSecret waits and gets the status of the Secret

func WaitForService

func WaitForService(clients kubernetes.Interface, name, namespace string) (*corev1.Service, error)

WaitForService waits and gets the status of the Service

func WaitForServiceAccount

func WaitForServiceAccount(clients kubernetes.Interface, name, namespace string) (*corev1.ServiceAccount, error)

WaitForServiceAccount waits and gets the status of the ServiceAccount

Types

This section is empty.

Jump to

Keyboard shortcuts

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