test

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearDeploymentsUpdated

func ClearDeploymentsUpdated(deploymentsUpdated *[]*extensions.Deployment)

ClearDeploymentsUpdated clears the deploymentsUpdated list

func DeploymentNamesUpdated

func DeploymentNamesUpdated(deploymentsUpdated *[]*extensions.Deployment) []string

DeploymentNamesUpdated converts a deploymentsUpdated slice into a string slice of deployment names

func UpdateDeploymentAndWaitStub

func UpdateDeploymentAndWaitStub() (
	stubFunc func(context *clusterd.Context, deployment *extensions.Deployment, namespace string) error,
	deploymentsUpdated *[]*extensions.Deployment,
)

UpdateDeploymentAndWaitStub returns a stub replacement for the UpdateDeploymentAndWait function for unit tests which always returns success (nil). The generated simple clientset doesn't seem to handle the Deployment.Update method as expected. The deployment is instead zero-ed out when the deployment is updated with an unchanged version, which breaks unit tests. In order to still test the UpdateDeploymentAndWait function, the stub function returned will append a copy of the deployment used as input to the list of deployments updated. The function returns a pointer to this slice which the calling func may use to verify the expected contents of deploymentsUpdated based on expected behavior.

Types

This section is empty.

Jump to

Keyboard shortcuts

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