Documentation ¶
Index ¶
- Constants
- Variables
- func CreateKafkaTopic(topicName string, partitions int32)
- func DaemonPodLogContains(ctx context.Context, kubeClient kubernetes.Interface, ...) (bool, error)
- func DeleteKafkaTopic(topic string)
- func Exec(name string, args ...string) (string, error)
- func ExpectKafkaTopicCount(topic string, total int, timeout time.Duration)
- func GenerateKafkaTopicName() string
- func GetKafkaCount(topic string, count int) int
- func HTTPExpect(t require.TestingT, baseURL string) *httpexpect.Expect
- func InvokeE2EAPI(format string, args ...interface{}) string
- func InvokeE2EAPIPOST(format string, body string, args ...interface{}) string
- func ListKafkaTopics()
- func MonoVertexPodLogContains(ctx context.Context, kubeClient kubernetes.Interface, ...) (bool, error)
- func PodPortForward(config *rest.Config, namespace, podName string, localPort, remotePort int, ...) error
- func PodsLogContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, regex string, ...) bool
- func PodsLogNotContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, regex string, ...) bool
- func PumpJetstream(streamName string, payload string, count int)
- func PumpKafkaTopic(topic string, n int, opts ...interface{})
- func PumpNatsSubject(subject string, n int, opts ...interface{})
- func SendMessage(topic string, key string, message string, partition int)
- func SendMessageTo(host string, vertexName string, r HttpPostRequest)
- func VertexPodLogContains(ctx context.Context, kubeClient kubernetes.Interface, ...) (bool, error)
- func VertexPodLogNotContains(ctx context.Context, kubeClient kubernetes.Interface, ...) (bool, error)
- func WaitForDaemonPodsRunning(kubeClient kubernetes.Interface, namespace, pipelineName string, ...) error
- func WaitForISBSvcReady(ctx context.Context, isbSvcClient flowpkg.InterStepBufferServiceInterface, ...) error
- func WaitForISBSvcStatefulSetReady(ctx context.Context, kubeClient kubernetes.Interface, ...) error
- func WaitForMonoVertexPodRunning(kubeClient kubernetes.Interface, monoVertexClient flowpkg.MonoVertexInterface, ...) error
- func WaitForMonoVertexRunning(ctx context.Context, monoVertexClient flowpkg.MonoVertexInterface, ...) error
- func WaitForPipelineRunning(ctx context.Context, pipelineClient flowpkg.PipelineInterface, ...) error
- func WaitForVertexPodRunning(kubeClient kubernetes.Interface, vertexClient flowpkg.VertexInterface, ...) error
- func WaitForVertexPodScalingTo(kubeClient kubernetes.Interface, vertexClient flowpkg.VertexInterface, ...) error
- type CheckFunc
- type E2ESuite
- type Expect
- func (t *Expect) DaemonPodLogContains(pipelineName, regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) DaemonPodsRunning() *Expect
- func (t *Expect) ISBSvcDeleted(timeout time.Duration) *Expect
- func (t *Expect) MonoVertexPodLogContains(regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) MonoVertexPodsRunning() *Expect
- func (t *Expect) RedisSinkContains(hashKey string, targetStr string, opts ...SinkCheckOption) *Expect
- func (t *Expect) RedisSinkNotContains(hashKey string, targetStr string, opts ...SinkCheckOption) *Expect
- func (t *Expect) VertexPodLogContains(vertexName, regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) VertexPodLogNotContains(vertexName, regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) VertexPodsRunning() *Expect
- func (t *Expect) VertexSizeScaledTo(v string, size int) *Expect
- func (t *Expect) When() *When
- type Given
- type HttpPostRequest
- type PodLogCheckOption
- type SinkCheckOption
- type When
- func (w *When) And(block func()) *When
- func (w *When) CreateISBSvc() *When
- func (w *When) CreateMonoVertexAndWait() *When
- func (w *When) CreatePipelineAndWait() *When
- func (w *When) DaemonPodPortForward(pipelineName string, localPort, remotePort int) *When
- func (w *When) DeleteISBSvc() *When
- func (w *When) DeleteMonoVertexAndWait() *When
- func (w *When) DeletePipelineAndWait() *When
- func (w *When) Exec(name string, args []string, block func(t *testing.T, output string, err error)) *When
- func (w *When) Expect() *Expect
- func (w *When) Given() *Given
- func (w *When) SendMessageTo(pipelineName string, vertexName string, req HttpPostRequest) *When
- func (w *When) StreamControllerLogs() *When
- func (w *When) StreamISBLogs() *When
- func (w *When) StreamVertexPodLogs(vertexName, containerName string) *When
- func (w *When) TerminateAllPodLogs() *When
- func (w *When) TerminateAllPodPortForwards() *When
- func (w *When) UXServerPodPortForward(localPort, remotePort int) *When
- func (w *When) VertexPodPortForward(vertexName string, localPort, remotePort int) *When
- func (w *When) Wait(timeout time.Duration) *When
- func (w *When) WaitForISBSvcReady() *When
Constants ¶
const ( Namespace = "numaflow-system" Label = "numaflow-e2e" LabelValue = "true" ISBSvcName = "numaflow-e2e" LogSourceVertexStarted = "Start processing source messages" SinkVertexStarted = "Start processing sink messages" LogUDFVertexStarted = "Start processing udf messages" LogReduceUDFVertexStarted = "Start processing reduce udf messages" LogDaemonStarted = "Daemon server started successfully" )
Variables ¶
var CheckPodKillSucceeded = func(t *testing.T, output string, err error) { assert.Contains(t, output, "deleted") assert.NoError(t, err) }
Functions ¶
func CreateKafkaTopic ¶
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)
func ExpectKafkaTopicCount ¶
func GenerateKafkaTopicName ¶ added in v1.3.0
func GenerateKafkaTopicName() string
func GetKafkaCount ¶
func HTTPExpect ¶
func InvokeE2EAPI ¶
func InvokeE2EAPIPOST ¶
func ListKafkaTopics ¶ added in v1.3.0
func ListKafkaTopics()
func MonoVertexPodLogContains ¶ added in v1.3.0
func MonoVertexPodLogContains(ctx context.Context, kubeClient kubernetes.Interface, namespace, mvName, regex string, opts ...PodLogCheckOption) (bool, error)
func PodPortForward ¶
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 PumpJetstream ¶ added in v1.3.0
func PumpKafkaTopic ¶
func PumpNatsSubject ¶ added in v0.7.0
func SendMessageTo ¶ added in v0.7.0
func SendMessageTo(host string, vertexName string, r HttpPostRequest)
SendMessageTo sends a http post request to a pod in http source vertex.
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 WaitForISBSvcReady ¶
func WaitForMonoVertexPodRunning ¶ added in v1.3.0
func WaitForMonoVertexPodRunning(kubeClient kubernetes.Interface, monoVertexClient flowpkg.MonoVertexInterface, namespace, monoVertexName string, timeout time.Duration) error
func WaitForMonoVertexRunning ¶ added in v1.3.0
func WaitForPipelineRunning ¶
func WaitForVertexPodRunning ¶
func WaitForVertexPodRunning(kubeClient kubernetes.Interface, vertexClient flowpkg.VertexInterface, namespace, pipelineName, vertexName string, timeout time.Duration) error
func WaitForVertexPodScalingTo ¶ added in v0.7.3
func WaitForVertexPodScalingTo(kubeClient kubernetes.Interface, vertexClient flowpkg.VertexInterface, namespace, pipelineName, vertexName string, timeout time.Duration, size int) error
Types ¶
type E2ESuite ¶
func (*E2ESuite) CheckError ¶
func (*E2ESuite) SetupSuite ¶
func (s *E2ESuite) SetupSuite()
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 (*Expect) MonoVertexPodLogContains ¶ added in v1.3.0
func (t *Expect) MonoVertexPodLogContains(regex string, opts ...PodLogCheckOption) *Expect
func (*Expect) MonoVertexPodsRunning ¶ added in v1.3.0
func (*Expect) RedisSinkContains ¶ added in v1.3.0
func (t *Expect) RedisSinkContains(hashKey string, targetStr string, opts ...SinkCheckOption) *Expect
RedisSinkContains checks if the target string is written to the redis sink hashKey is the hash key environment variable set by the sink targetStr is the target string to check
func (*Expect) RedisSinkNotContains ¶ added in v1.3.0
func (t *Expect) RedisSinkNotContains(hashKey string, targetStr string, opts ...SinkCheckOption) *Expect
RedisSinkNotContains checks if the target string is not written to the redis sink hashKey is the hash key environment variable set by the sink targetStr is the target string to check
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 (*Expect) VertexSizeScaledTo ¶ added in v0.7.3
type Given ¶
type Given struct {
// contains filtered or unexported fields
}
func (*Given) ISBSvc ¶
ISBSvc creates an ISBSvc based on the parameter, this may be:
1. A file name if it starts with "@" 2. Raw YAML.
func (*Given) MonoVertex ¶ added in v1.3.0
MonoVertex creates a MonoVertex based on the parameter, this may be:
1. A file name if it starts with "@" 2. Raw YAML.
func (*Given) Pipeline ¶
Pipeline creates a Pipeline based on the parameter, this may be:
1. A file name if it starts with "@" 2. Raw YAML.
func (*Given) WithMonoVertex ¶ added in v1.3.0
func (g *Given) WithMonoVertex(mv *dfv1.MonoVertex) *Given
type HttpPostRequest ¶ added in v0.7.0
func NewHttpPostRequest ¶ added in v0.7.0
func NewHttpPostRequest() HttpPostRequest
NewHttpPostRequest constructor for HttpPostRequest
func (HttpPostRequest) WithBody ¶ added in v0.7.0
func (b HttpPostRequest) WithBody(body []byte) HttpPostRequest
func (HttpPostRequest) WithHeader ¶ added in v0.7.0
func (b HttpPostRequest) WithHeader(k, v string) HttpPostRequest
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 SinkCheckOption ¶ added in v0.7.0
type SinkCheckOption func(*redisCheckOptions)
func SinkCheckWithContainCount ¶ added in v1.2.0
func SinkCheckWithContainCount(c int) SinkCheckOption
SinkCheckWithContainCount updates the redisCheckOptions to specify count. The count is the expected number of matches for the check.
func SinkCheckWithTimeout ¶ added in v1.2.0
func SinkCheckWithTimeout(t time.Duration) SinkCheckOption
SinkCheckWithTimeout updates the redisCheckOptions to specify timeout. The timeout specifies how long the redis check will wait for expected data to be ready in redis.
type When ¶
type When struct {
// contains filtered or unexported fields
}
func (*When) CreateISBSvc ¶
func (*When) CreateMonoVertexAndWait ¶ added in v1.3.0
func (*When) CreatePipelineAndWait ¶
func (*When) DaemonPodPortForward ¶ added in v0.5.4
func (*When) DeleteISBSvc ¶
func (*When) DeleteMonoVertexAndWait ¶ added in v1.3.0
func (*When) DeletePipelineAndWait ¶
func (*When) SendMessageTo ¶ added in v0.7.0
func (w *When) SendMessageTo(pipelineName string, vertexName string, req HttpPostRequest) *When
SendMessageTo sends msg to one of the pods in http source vertex.