Documentation ¶
Overview ¶
Package testing provides support for automated testing of nats-operator-doctor.
Package testing provides support for automated testing of nats-operator-doctor.
Index ¶
- func GetDeployment(name, namespace string, opts ...Option) *appsv1.Deployment
- func GetDeploymentIfNil(deployment *appsv1.Deployment) *appsv1.Deployment
- func GetNatsCluster(name, namespace string, size int) *v1alpha2.NatsCluster
- func GetNatsClusterIfNil(natsCluster *v1alpha2.NatsCluster) *v1alpha2.NatsCluster
- func GetNatsClusterList(natsClusters ...v1alpha2.NatsCluster) *v1alpha2.NatsClusterList
- func GetPod(name, namespace string, opts ...Option) *v1.Pod
- func GetPodIfNil(pod *v1.Pod) *v1.Pod
- func GetSecret(name, namespace string, opts ...Option) *v1.Secret
- func PodsToRuntimeObjects(pods []*v1.Pod) []runtime.Object
- func SecretsToRuntimeObjects(secrets []*v1.Secret) []runtime.Object
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDeployment ¶
func GetDeployment(name, namespace string, opts ...Option) *appsv1.Deployment
GetDeployment returns a new Kubernetes Deployment instance.
func GetDeploymentIfNil ¶
func GetDeploymentIfNil(deployment *appsv1.Deployment) *appsv1.Deployment
GetDeploymentIfNil returns a new Kubernetes Deployment instance if the given one is nil.
func GetNatsCluster ¶
func GetNatsCluster(name, namespace string, size int) *v1alpha2.NatsCluster
GetNatsCluster returns a new NatsCluster instance.
func GetNatsClusterIfNil ¶
func GetNatsClusterIfNil(natsCluster *v1alpha2.NatsCluster) *v1alpha2.NatsCluster
GetNatsClusterIfNil returns a new NatsCluster instance if the given one is nil.
func GetNatsClusterList ¶
func GetNatsClusterList(natsClusters ...v1alpha2.NatsCluster) *v1alpha2.NatsClusterList
GetNatsClusterList returns a new NatsClusterList instance.
func GetPodIfNil ¶
GetPodIfNil returns a new Kubernetes Pod instance if the given one is nil.
func PodsToRuntimeObjects ¶
PodsToRuntimeObjects returns an array of runtime objects from the given pods.
Types ¶
type Option ¶
Option represents a function that can operate on a Kubernetes runtime object.
func DeploymentWithReplicas ¶
DeploymentWithReplicas returns an option function that should update a Kubernetes Deployment with the given replicas.
func PodWithLabel ¶
PodWithLabel returns an option function that should label a Kubernetes Pod with the given key and value.
func PodWithPhase ¶
PodWithPhase returns an option function that should update a Kubernetes Pod with the given phase.
func SecretWithLabel ¶
SecretWithLabel returns an option function that should label a Kubernetes Secret.