fixtures

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace    = "argo-events"
	Label        = "argo-events-e2e"
	LabelValue   = "true"
	EventBusName = "argo-events-e2e"
)

Variables

View Source
var (
	E2EEventBusSTAN = `apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
  name: default
spec:
  nats:
    native:
      auth: token`

	E2EEventBusJetstream = `apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
  name: default
spec:
  jetstream:
    version: latest`

	E2EEventBusKafka = `apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
  name: default
spec:
  kafka:
    url: kafka:9092`
)
View Source
var OutputRegexp = func(rx string) func(t *testing.T, output string, err error) {
	return func(t *testing.T, output string, err error) {
		t.Helper()
		if assert.NoError(t, err, output) {
			assert.Regexp(t, rx, output)
		}
	}
}

Functions

func Exec

func Exec(name string, args ...string) (string, error)

func GetBusDriverSpec added in v1.7.1

func GetBusDriverSpec() string

Types

type E2ESuite

type E2ESuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*E2ESuite) BeforeTest

func (s *E2ESuite) BeforeTest(string, string)

func (*E2ESuite) CheckError

func (s *E2ESuite) CheckError(err error)

func (*E2ESuite) DeleteResources

func (s *E2ESuite) DeleteResources()

func (*E2ESuite) Given

func (s *E2ESuite) Given() *Given

func (*E2ESuite) SetupSuite

func (s *E2ESuite) SetupSuite()

func (*E2ESuite) TearDownSuite

func (s *E2ESuite) TearDownSuite()

type Given

type Given struct {
	// contains filtered or unexported fields
}

func (*Given) EventBus

func (g *Given) EventBus(text string) *Given

creates an EventBus based on the parameter, this may be:

1. A file name if it starts with "@" 2. Raw YAML.

func (*Given) EventSource

func (g *Given) EventSource(text string) *Given

creates an EventSource based on the parameter, this may be:

1. A file name if it starts with "@" 2. Raw YAML.

func (*Given) Sensor

func (g *Given) Sensor(text string) *Given

creates a Sensor based on the parameter, this may be:

1. A file name if it starts with "@" 2. Raw YAML.

func (*Given) When

func (g *Given) When() *When

type Then

type Then struct {
	// contains filtered or unexported fields
}

func (*Then) EventSourcePodPortForward

func (t *Then) EventSourcePodPortForward(localPort, remotePort int) *Then

func (*Then) ExpectEventBusDeleted

func (t *Then) ExpectEventBusDeleted() *Then

func (*Then) ExpectEventSourcePodLogContains

func (t *Then) ExpectEventSourcePodLogContains(regex string, options ...testutil.PodLogCheckOption) *Then

look for regex match in Sensor pod's log if countOpt != nil, look for specific count of regex match; else look for at least one instance

func (*Then) ExpectNoSensorPodFound added in v1.7.2

func (t *Then) ExpectNoSensorPodFound() *Then

func (*Then) ExpectSensorPodLogContains

func (t *Then) ExpectSensorPodLogContains(regex string, options ...testutil.PodLogCheckOption) *Then

look for regex match in EventSource pod's log if countOpt != nil, look for specific count of regex match; else look for at least one instance

func (*Then) SensorPodPortForward

func (t *Then) SensorPodPortForward(localPort, remotePort int) *Then

func (*Then) TerminateAllPodPortForwards

func (t *Then) TerminateAllPodPortForwards() *Then

func (*Then) When

func (t *Then) When() *When

type When

type When struct {
	// contains filtered or unexported fields
}

func (*When) And

func (w *When) And(block func()) *When

func (*When) CreateEventBus

func (w *When) CreateEventBus() *When

func (*When) CreateEventSource

func (w *When) CreateEventSource() *When

func (*When) CreateSensor

func (w *When) CreateSensor() *When

func (*When) DeleteEventBus

func (w *When) DeleteEventBus() *When

func (*When) DeleteEventSource added in v1.7.1

func (w *When) DeleteEventSource() *When

func (*When) DeleteSensor added in v1.7.1

func (w *When) DeleteSensor() *When

func (*When) Exec

func (w *When) Exec(name string, args []string, block func(t *testing.T, output string, err error)) *When

func (*When) Given

func (w *When) Given() *Given

func (*When) Then

func (w *When) Then() *Then

func (*When) Wait

func (w *When) Wait(timeout time.Duration) *When

func (*When) WaitForEventBusReady

func (w *When) WaitForEventBusReady() *When

func (*When) WaitForEventSourceReady

func (w *When) WaitForEventSourceReady() *When

func (*When) WaitForSensorReady

func (w *When) WaitForSensorReady() *When

Jump to

Keyboard shortcuts

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