Documentation
¶
Overview ¶
Package rollouts provides Terratest-style helpers for testing Argo Rollouts. It includes polling-based utilities for checking rollout phases, pause states, and progressive deployment status using the Argo Rollouts clientset.
Index ¶
- func ListRollouts(t *testing.T, options *k8s.KubectlOptions, namespace string) []rolloutsv1alpha1.Rollout
- func NewArgoRolloutsClient(t *testing.T, options *k8s.KubectlOptions) (rolloutClientSet.Interface, error)
- func WaitForRolloutHealthy(t *testing.T, options *k8s.KubectlOptions, name, namespace string, ...)
- func WaitForRolloutPaused(t *testing.T, options *k8s.KubectlOptions, name, namespace string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListRollouts ¶ added in v0.0.5
func ListRollouts(t *testing.T, options *k8s.KubectlOptions, namespace string) []rolloutsv1alpha1.Rollout
func NewArgoRolloutsClient ¶ added in v0.0.5
func NewArgoRolloutsClient(t *testing.T, options *k8s.KubectlOptions) (rolloutClientSet.Interface, error)
func WaitForRolloutHealthy ¶
func WaitForRolloutHealthy(t *testing.T, options *k8s.KubectlOptions, name, namespace string, timeout time.Duration)
WaitForRolloutHealthy waits until the specified Argo Rollout resource reaches a Healthy phase within the given timeout. It polls the rollout status every 2 seconds and checks for the "Progressing" condition with status "True" and phase "Healthy". If the rollout does not become healthy within the timeout, the test fails. Parameters:
- t: The testing context.
- options: Kubectl options containing the REST config for the Kubernetes client.
- name: The name of the rollout resource.
- namespace: The namespace of the rollout resource.
- timeout: The maximum duration to wait for the rollout to become healthy.
func WaitForRolloutPaused ¶
func WaitForRolloutPaused(t *testing.T, options *k8s.KubectlOptions, name, namespace string, timeout time.Duration)
WaitForRolloutPaused waits until the specified Argo Rollout resource enters the "Paused" phase within the given timeout. It polls the rollout status every 2 seconds using the provided Kubernetes options, rollout name, and namespace. If the rollout does not reach the paused phase within the timeout, the test fails with a fatal error. Requires a valid Argo Rollouts clientset and test context.
Parameters:
t - The testing context. options - The kubectl options containing REST config for the client. name - The name of the rollout resource. namespace- The namespace of the rollout resource. timeout - The maximum duration to wait for the rollout to pause.
Types ¶
This section is empty.