resources

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 26 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
	// LoggingConfigKey specifies specifies the key name of the logging config map.
	LoggingConfigKey = "logging"
	// DefaultsConfigKey specifies the key name of the default config map.
	DefaultsConfigKey = "defaults"
)

Variables

This section is empty.

Functions

func AssertKEOperatorCRReadyStatus

func AssertKEOperatorCRReadyStatus(t *testing.T, clients *test.Clients, names test.ResourceNames)

AssertKEOperatorCRReadyStatus verifies if the KnativeEventing can reach the READY status.

func AssertKSOperatorCRReadyStatus

func AssertKSOperatorCRReadyStatus(t *testing.T, clients *test.Clients, names test.ResourceNames)

AssertKSOperatorCRReadyStatus verifies if the KnativeServing reaches the READY status.

func AssertKnativeDeploymentStatus added in v0.15.0

func AssertKnativeDeploymentStatus(t *testing.T, clients *test.Clients, namespace string, expectedDeployments []string)

AssertKnativeDeploymentStatus verifies if the Knative deployments reach the READY status.

func AssertKnativeObsoleteResource added in v0.16.0

func AssertKnativeObsoleteResource(t *testing.T, clients *test.Clients, namespace string, obsResources []unstructured.Unstructured)

AssertKnativeObsoleteResource verifies if all obsolete resources disappear in the cluster

func DeleteAndVerifyDeployments

func DeleteAndVerifyDeployments(t *testing.T, clients *test.Clients, names test.ResourceNames)

DeleteAndVerifyDeployments verify whether all the deployments for knative serving are able to recreate, when they are deleted.

func DeleteAndVerifyEventingDeployments

func DeleteAndVerifyEventingDeployments(t *testing.T, clients *test.Clients, names test.ResourceNames)

DeleteAndVerifyEventingDeployments verify whether all the deployments for knative eventing are able to recreate, when they are deleted.

func EnsureKnativeEventingExists

func EnsureKnativeEventingExists(clients eventingv1alpha1.KnativeEventingInterface, names test.ResourceNames) (*v1alpha1.KnativeEventing, error)

EnsureKnativeEventingExists creates a KnativeEventingServing with the name names.KnativeEventing under the namespace names.Namespace.

func EnsureKnativeServingExists

func EnsureKnativeServingExists(clients servingv1alpha1.KnativeServingInterface, names test.ResourceNames) (*v1alpha1.KnativeServing, error)

EnsureKnativeServingExists creates a KnativeServing with the name names.KnativeServing under the namespace names.Namespace, if it does not exist.

func GetExpectedDeployments added in v0.16.0

func GetExpectedDeployments(manifest mf.Manifest) []string

GetExpectedDeployments will return an array of deployment resources based on the version for the knative component.

func IsDeploymentAvailable

func IsDeploymentAvailable(d *v1.Deployment) (bool, error)

IsDeploymentAvailable will check the status conditions of the deployment and return true if the deployment is available.

func IsKnativeDeploymentReady added in v0.15.0

func IsKnativeDeploymentReady(dpList *v1.DeploymentList, expectedDeployments []string, err error,
	logf logging.FormatLogger) (bool, error)

IsKnativeDeploymentReady will check the status conditions of the deployments and return true if the deployments meet the desired status.

func IsKnativeEventingReady

func IsKnativeEventingReady(s *v1alpha1.KnativeEventing, err error) (bool, error)

IsKnativeEventingReady will check the status conditions of the KnativeEventing and return true if the KnativeEventing is ready.

func IsKnativeObsoleteResourceGone added in v0.16.0

func IsKnativeObsoleteResourceGone(clients *test.Clients, namespace string, obsResources []unstructured.Unstructured,
	logf logging.FormatLogger) (bool, error)

IsKnativeObsoleteResourceGone check the status conditions of the resources and return true if the obsolete resources are removed.

func IsKnativeServingReady

func IsKnativeServingReady(s *v1alpha1.KnativeServing, err error) (bool, error)

IsKnativeServingReady will check the status conditions of the KnativeServing and return true if the KnativeServing is ready.

func KEOperatorCRDelete

func KEOperatorCRDelete(t *testing.T, clients *test.Clients, names test.ResourceNames)

KEOperatorCRDelete deletes tha KnativeEventing to see if all resources will be deleted

func KSOperatorCRDelete

func KSOperatorCRDelete(t *testing.T, clients *test.Clients, names test.ResourceNames)

KSOperatorCRDelete deletes tha KnativeServing to see if all resources will be deleted

func KSOperatorCRVerifyConfiguration

func KSOperatorCRVerifyConfiguration(t *testing.T, clients *test.Clients, names test.ResourceNames)

KSOperatorCRVerifyConfiguration verifies that KnativeServing config is set properly

func SetKodataDir added in v0.16.0

func SetKodataDir()

SetKodataDir will set the env var KO_DATA_PATH into the path of the kodata of this repository.

func WaitForConfigMap

func WaitForConfigMap(name string, client *kubernetes.Clientset, fn func(map[string]string) bool) error

WaitForConfigMap takes a condition function that evaluates ConfigMap data

func WaitForKnativeDeploymentState added in v0.15.0

func WaitForKnativeDeploymentState(clients *test.Clients, namespace string, expectedDeployments []string, logf logging.FormatLogger,
	inState func(deps *v1.DeploymentList, expectedDeployments []string, err error, logf logging.FormatLogger) (bool, error)) error

WaitForKnativeDeploymentState polls the status of the Knative deployments every `interval` until `inState` returns `true` indicating the deployments match the desired deployments.

func WaitForKnativeEventingState

func WaitForKnativeEventingState(clients eventingv1alpha1.KnativeEventingInterface, name string,
	inState func(s *v1alpha1.KnativeEventing, err error) (bool, error)) (*v1alpha1.KnativeEventing, error)

WaitForKnativeEventingState polls the status of the KnativeEventing called name from client every `interval` until `inState` returns `true` indicating it is done, returns an error or timeout.

func WaitForKnativeResourceState added in v0.16.0

func WaitForKnativeResourceState(clients *test.Clients, namespace string,
	obsResources []unstructured.Unstructured, logf logging.FormatLogger, inState func(clients *test.Clients,
		namespace string, obsResources []unstructured.Unstructured, logf logging.FormatLogger) (bool, error)) error

WaitForKnativeResourceState returns the status of whether all obsolete resources are removed

func WaitForKnativeServingState

func WaitForKnativeServingState(clients servingv1alpha1.KnativeServingInterface, name string,
	inState func(s *v1alpha1.KnativeServing, err error) (bool, error)) (*v1alpha1.KnativeServing, error)

WaitForKnativeServingState polls the status of the KnativeServing called name from client every `interval` until `inState` returns `true` indicating it is done, returns an error or timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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