fixtures

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace  = "numaflow-system"
	Label      = "numaflow-e2e"
	LabelValue = "true"
	ISBSvcName = "numaflow-e2e"

	LogSourceVertexStarted = "Start processing source messages"
	LogSinkVertexStarted   = "Start processing sink messages"
	LogUDFVertexStarted    = "Start processing udf messages"
	LogDaemonStarted       = "Daemon server started successfully"
)

Variables

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 CreateKafkaTopic

func CreateKafkaTopic() string

func DaemonPodLogContains added in v0.5.4

func DaemonPodLogContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, pipelineName, regex string, opts ...PodLogCheckOption) (bool, error)

func DeleteKafkaTopic

func DeleteKafkaTopic(topic string) string

func Exec

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

func ExpectKafkaTopicCount

func ExpectKafkaTopicCount(topic string, total int, timeout time.Duration)

func GetKafkaCount

func GetKafkaCount(topic string, count int) int

func HTTPExpect

func HTTPExpect(t require.TestingT, baseURL string) *httpexpect.Expect

func InvokeE2EAPI

func InvokeE2EAPI(format string, args ...interface{}) string

func InvokeE2EAPIPOST

func InvokeE2EAPIPOST(format string, body string, args ...interface{}) string

func PodPortForward

func PodPortForward(config *rest.Config, namespace, podName string, localPort, remotePort int, stopCh <-chan struct{}) error

func PodsLogContains

func PodsLogContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, regex string, podList *corev1.PodList, opts ...PodLogCheckOption) bool

func PodsLogNotContains added in v0.5.3

func PodsLogNotContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, regex string, podList *corev1.PodList, opts ...PodLogCheckOption) bool

func PumpKafkaTopic

func PumpKafkaTopic(topic string, n int, opts ...interface{})

func SendMessage

func SendMessage(topic string, key string, message string)

func ValidateMessage

func ValidateMessage(topic string, key string, position int)

func VertexPodLogContains

func VertexPodLogContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, pipelineName, vertexName, regex string, opts ...PodLogCheckOption) (bool, error)

func VertexPodLogNotContains added in v0.5.3

func VertexPodLogNotContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, pipelineName, vertexName, regex string, opts ...PodLogCheckOption) (bool, error)

func WaitForDaemonPodsRunning added in v0.5.4

func WaitForDaemonPodsRunning(kubeClient kubernetes.Interface, namespace, pipelineName string, timeout time.Duration) error

func WaitForISBSvcReady

func WaitForISBSvcReady(ctx context.Context, isbSvcClient flowpkg.InterStepBufferServiceInterface, isbSvcName string, timeout time.Duration) error

func WaitForISBSvcStatefulSetReady

func WaitForISBSvcStatefulSetReady(ctx context.Context, kubeClient kubernetes.Interface, namespace, isbSvcName string, timeout time.Duration) error

func WaitForPipelineRunning

func WaitForPipelineRunning(ctx context.Context, pipelineClient flowpkg.PipelineInterface, pipelineName string, timeout time.Duration) error

func WaitForVertexPodRunning

func WaitForVertexPodRunning(kubeClient kubernetes.Interface, vertexClient flowpkg.VertexInterface, namespace, pipelineName, vertexName string, timeout time.Duration) error

Types

type E2ESuite

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

func (*E2ESuite) CheckError

func (s *E2ESuite) CheckError(err error)

func (*E2ESuite) Given

func (s *E2ESuite) Given() *Given

func (*E2ESuite) SetupSuite

func (s *E2ESuite) SetupSuite()

func (*E2ESuite) StartPortForward

func (s *E2ESuite) StartPortForward(podName string, port int) (stopPortForward func())

func (*E2ESuite) TearDownSuite

func (s *E2ESuite) TearDownSuite()

type Expect

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

func (*Expect) DaemonPodLogContains added in v0.5.4

func (t *Expect) DaemonPodLogContains(pipelineName, regex string, opts ...PodLogCheckOption) *Expect

func (*Expect) DaemonPodsRunning added in v0.5.4

func (t *Expect) DaemonPodsRunning() *Expect

func (*Expect) ISBSvcDeleted

func (t *Expect) ISBSvcDeleted(timeout time.Duration) *Expect

func (*Expect) VertexPodLogContains

func (t *Expect) VertexPodLogContains(vertexName, regex string, opts ...PodLogCheckOption) *Expect

func (*Expect) VertexPodLogNotContains added in v0.5.3

func (t *Expect) VertexPodLogNotContains(vertexName, regex string, opts ...PodLogCheckOption) *Expect

func (*Expect) VertexPodsRunning

func (t *Expect) VertexPodsRunning() *Expect

func (*Expect) When

func (t *Expect) When() *When

type Given

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

func (*Given) ISBSvc

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

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

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

func (*Given) Pipeline

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

creates a Pipeline 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

func (*Given) WithPipeline

func (g *Given) WithPipeline(p *dfv1.Pipeline) *Given

type PodLogCheckOption added in v0.5.3

type PodLogCheckOption func(*podLogCheckOptions)

func PodLogCheckOptionWithContainer added in v0.5.3

func PodLogCheckOptionWithContainer(c string) PodLogCheckOption

func PodLogCheckOptionWithCount added in v0.5.3

func PodLogCheckOptionWithCount(c int) PodLogCheckOption

func PodLogCheckOptionWithTimeout added in v0.5.3

func PodLogCheckOptionWithTimeout(t time.Duration) PodLogCheckOption

type When

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

func (*When) And

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

func (*When) CreateISBSvc

func (w *When) CreateISBSvc() *When

func (*When) CreatePipelineAndWait

func (w *When) CreatePipelineAndWait() *When

func (*When) DaemonPodPortForward added in v0.5.4

func (w *When) DaemonPodPortForward(pipelineName string, localPort, remotePort int) *When

func (*When) DeleteISBSvc

func (w *When) DeleteISBSvc() *When

func (*When) DeletePipelineAndWait

func (w *When) DeletePipelineAndWait() *When

func (*When) Exec

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

func (*When) Expect

func (w *When) Expect() *Expect

func (*When) Given

func (w *When) Given() *Given

func (*When) TerminateAllPodPortForwards

func (w *When) TerminateAllPodPortForwards() *When

func (*When) VertexPodPortForward

func (w *When) VertexPodPortForward(vertexName string, localPort, remotePort int) *When

func (*When) Wait

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

func (*When) WaitForISBSvcReady

func (w *When) WaitForISBSvcReady() *When

Jump to

Keyboard shortcuts

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