events

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package events provides Terratest-style helpers for testing Argo Events resources, including EventSources and Sensors. These helpers use client-go polling to wait for resources to report a Ready condition, ensuring event-driven workflows are correctly configured.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasReadyCondition

func HasReadyCondition(conds []metav1.Condition, expectedType string) bool

HasReadyCondition checks if the provided slice of metav1.Condition contains a condition of the specified type with a status of "True". It returns true if such a condition is found, otherwise returns false.

conds: Slice of metav1.Condition to search through. expectedType: The condition type to look for.

Returns true if a condition with the expected type and a status of "True" exists, false otherwise.

func ListEventBuses added in v0.0.5

func ListEventBuses(t *testing.T, options *k8s.KubectlOptions, namespace string) []argoeventsv1alpha1.EventBus

func ListEventSources added in v0.0.5

func ListEventSources(t *testing.T, options *k8s.KubectlOptions, namespace string) []argoeventsv1alpha1.EventSource

func ListSensors added in v0.0.5

func ListSensors(t *testing.T, options *k8s.KubectlOptions, namespace string) []argoeventsv1alpha1.Sensor

func NewArgoEventsClient added in v0.0.5

func NewArgoEventsClient(t *testing.T, options *k8s.KubectlOptions) (argoclientset.Interface, error)

func WaitForEventBusReady

func WaitForEventBusReady(t *testing.T, options *k8s.KubectlOptions, name, namespace string, timeout time.Duration)

WaitForEventBusReady waits until the specified Argo Events EventBus resource is Ready, or times out. Useful for integration tests to ensure event infrastructure is available before proceeding.

func WaitForEventSourceReady

func WaitForEventSourceReady(t *testing.T, options *k8s.KubectlOptions, name, namespace string, timeout time.Duration)

WaitForEventSourceReady waits until the specified Argo Events EventSource resource is Ready, or times out. Useful for integration tests to ensure event sources are available before proceeding.

func WaitForSensorReady

func WaitForSensorReady(t *testing.T, options *k8s.KubectlOptions, name, namespace string, timeout time.Duration)

WaitForSensorReady waits until the specified Argo Sensor resource in the given namespace becomes Ready. It polls the sensor's status conditions at regular intervals until the ConditionReady is True or the timeout is reached. If the sensor does not become Ready within the timeout, the test fails. Parameters:

  • t: The testing context.
  • options: Kubectl options containing the Kubernetes REST config.
  • name: The name of the Sensor resource.
  • namespace: The namespace where the Sensor is located.
  • timeout: The maximum duration to wait for the sensor to become Ready.

Types

This section is empty.

Jump to

Keyboard shortcuts

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