Documentation
¶
Index ¶
- Constants
- Variables
- func AssertJsonEqual[T string | int | int64 | bool | Json](t *testing.T, json string, path string, expected T)
- func AssertJsonExists(t *testing.T, json string, path string)
- func AssertJsonStringContains(t *testing.T, json string, path string, expectedContains string)
- 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 FetchServingResult(host, reqId string) string
- 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 MonoVertexPodLogNotContains(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 SendServingMessage(host, reqId, payload string, sync bool) string
- 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 WaitForMonoVertexPodScalingTo(kubeClient kubernetes.Interface, monoVertexClient flowpkg.MonoVertexInterface, ...) error
- func WaitForMonoVertexRunning(ctx context.Context, monoVertexClient flowpkg.MonoVertexInterface, ...) error
- func WaitForMvtxDaemonPodsRunning(kubeClient kubernetes.Interface, namespace, mvtx string, timeout time.Duration) error
- func WaitForPipelineRunning(ctx context.Context, pipelineClient flowpkg.PipelineInterface, ...) error
- func WaitForServingPipelineRunning(ctx context.Context, servingPipelineClient flowpkg.ServingPipelineInterface, ...) error
- func WaitForServingServerPodsRunning(kubeClient kubernetes.Interface, namespace, servingPipelineName string, ...) 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) MonoVertexNumaStable(baseline PodRuntimeSnapshot) *Expect
- func (t *Expect) MonoVertexPodLogContains(regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) MonoVertexPodLogNotContains(regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) MonoVertexPodRuntimeSnapshot() PodRuntimeSnapshot
- func (t *Expect) MonoVertexPodsRunning() *Expect
- func (t *Expect) MonoVertexSizeScaledTo(size int) *Expect
- func (t *Expect) MvtxDaemonPodsRunning() *Expect
- func (t *Expect) RedisSinkContains(hashKey string, targetStr string, opts ...SinkCheckOption) *Expect
- func (t *Expect) RedisSinkListEquals(keyName string, expectedValues []string, opts ...SinkCheckOption) *Expect
- func (t *Expect) RedisSinkNotContains(hashKey string, targetStr string, opts ...SinkCheckOption) *Expect
- func (t *Expect) ServingPodsRunning() *Expect
- func (t *Expect) VertexNumaStable(baseline PodRuntimeSnapshot, vertexName string) *Expect
- func (t *Expect) VertexPodLogContains(vertexName, regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) VertexPodLogNotContains(vertexName, regex string, opts ...PodLogCheckOption) *Expect
- func (t *Expect) VertexPodRuntimeSnapshot(vertexName string) PodRuntimeSnapshot
- func (t *Expect) VertexPodsRunning() *Expect
- func (t *Expect) VertexSizeScaledTo(v string, size int) *Expect
- func (t *Expect) When() *When
- type Given
- func (g *Given) ISBSvc(text string) *Given
- func (g *Given) MonoVertex(text string) *Given
- func (g *Given) Pipeline(text string) *Given
- func (g *Given) ServingPipeline(text string) *Given
- func (g *Given) When() *When
- func (g *Given) WithMonoVertex(mv *dfv1.MonoVertex) *Given
- func (g *Given) WithPipeline(p *dfv1.Pipeline) *Given
- type HttpPostRequest
- type Json
- type PodLogCheckOption
- type PodRuntimeSnapshot
- 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) CreateServingPipelineAndWait() *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) DeleteServingPipelineAndWait() *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) MonoVertexPodPortForward(localPort, remotePort int) *When
- func (w *When) MvtxDaemonPodPortForward(localPort, remotePort int) *When
- func (w *When) SendMessageTo(pipelineName string, vertexName string, req HttpPostRequest) *When
- func (w *When) SendMessageToMvTx(monoVertex string, req HttpPostRequest) *When
- func (w *When) StreamControllerLogs() *When
- func (w *When) StreamISBLogs() *When
- func (w *When) StreamMonoVertexPodLogs(containerName string) *When
- func (w *When) StreamServingPodLogs(containerName string) *When
- func (w *When) StreamServingVertexPodLogs(vertexName, containerName string) *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" LogSourceVertexStartedRustRuntime = "Starting source forwarder" LogSinkVertexStartedRustRuntime = "Starting sink forwarder" LogMapVertexStartedRustRuntime = "Starting map forwarder" LogReduceVertexStartedRustRuntime = "Starting reduce forwarder" LogRetryAttempt = `"retry_attempt":` LogRetriesExhaustedDrop = "Retries exhausted, dropping message" LogReceivedNack = "received nack" )
Variables ¶
var CheckPodKillSucceeded = func(t *testing.T, output string, err error) { assert.Contains(t, output, "deleted") assert.NoError(t, err) }
Functions ¶
func AssertJsonEqual ¶ added in v1.8.0
func AssertJsonEqual[T string | int | int64 | bool | Json](t *testing.T, json string, path string, expected T)
AssertJsonEqual asserts the path value of the json equals to the expected value
func AssertJsonExists ¶ added in v1.8.0
AssertJsonExists asserts the path exists in the json
func AssertJsonStringContains ¶ added in v1.8.0
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 FetchServingResult ¶ added in v1.5.0
func GenerateKafkaTopicName ¶ added in v1.3.0
func GenerateKafkaTopicName() string
func GetKafkaCount ¶
func HTTPExpect ¶
func HTTPExpect(t require.TestingT, baseURL string) *httpexpect.Expect
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 MonoVertexPodLogNotContains ¶ added in v1.5.0
func MonoVertexPodLogNotContains(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 SendServingMessage ¶ added in v1.5.0
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 WaitForMonoVertexPodScalingTo ¶ added in v1.9.0
func WaitForMonoVertexPodScalingTo(kubeClient kubernetes.Interface, monoVertexClient flowpkg.MonoVertexInterface, namespace, monoVertexName string, timeout time.Duration, size int) error
func WaitForMonoVertexRunning ¶ added in v1.3.0
func WaitForMvtxDaemonPodsRunning ¶ added in v1.5.0
func WaitForPipelineRunning ¶
func WaitForServingPipelineRunning ¶ added in v1.5.0
func WaitForServingServerPodsRunning ¶ added in v1.7.0
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) MonoVertexNumaStable ¶ added in v1.9.0
func (t *Expect) MonoVertexNumaStable(baseline PodRuntimeSnapshot) *Expect
MonoVertexNumaStable verifies that the exact pod captured in the baseline snapshot is still the one running the MonoVertex, and that its numa container has not restarted since the baseline was taken.
func (*Expect) MonoVertexPodLogContains ¶ added in v1.3.0
func (t *Expect) MonoVertexPodLogContains(regex string, opts ...PodLogCheckOption) *Expect
func (*Expect) MonoVertexPodLogNotContains ¶ added in v1.5.0
func (t *Expect) MonoVertexPodLogNotContains(regex string, opts ...PodLogCheckOption) *Expect
func (*Expect) MonoVertexPodRuntimeSnapshot ¶ added in v1.9.0
func (t *Expect) MonoVertexPodRuntimeSnapshot() PodRuntimeSnapshot
func (*Expect) MonoVertexPodsRunning ¶ added in v1.3.0
func (*Expect) MonoVertexSizeScaledTo ¶ added in v1.9.0
func (*Expect) MvtxDaemonPodsRunning ¶ added in v1.5.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) RedisSinkListEquals ¶ added in v1.8.0
func (t *Expect) RedisSinkListEquals(keyName string, expectedValues []string, opts ...SinkCheckOption) *Expect
RedisSinkListEquals checks that the Redis list at keyName contains exactly the expectedValues in order. This is used for ordered processing verification where the Rust redis-sink stores values as lists using RPUSH.
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) ServingPodsRunning ¶ added in v1.7.0
func (*Expect) VertexNumaStable ¶ added in v1.9.0
func (t *Expect) VertexNumaStable(baseline PodRuntimeSnapshot, vertexName string) *Expect
VertexNumaStable verifies that the exact pod captured in the baseline snapshot is still the one running the vertex, and that its numa container has not restarted since the baseline was taken.
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) VertexPodRuntimeSnapshot ¶ added in v1.9.0
func (t *Expect) VertexPodRuntimeSnapshot(vertexName string) PodRuntimeSnapshot
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) ServingPipeline ¶ added in v1.5.0
ServingPipeline 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 PodRuntimeSnapshot ¶ added in v1.9.0
PodRuntimeSnapshot captures pod identity and numa container restart state.
func WaitForMonoVertexPodRuntimeSnapshot ¶ added in v1.9.0
func WaitForMonoVertexPodRuntimeSnapshot(kubeClient kubernetes.Interface, monoVertexClient flowpkg.MonoVertexInterface, namespace, monoVertexName string, timeout time.Duration) (PodRuntimeSnapshot, error)
WaitForMonoVertexPodRuntimeSnapshot waits until the MonoVertex pod is running and reports numa container status.
func WaitForVertexPodRuntimeSnapshot ¶ added in v1.9.0
func WaitForVertexPodRuntimeSnapshot(kubeClient kubernetes.Interface, vertexClient flowpkg.VertexInterface, namespace, pipelineName, vertexName string, timeout time.Duration) (PodRuntimeSnapshot, error)
WaitForVertexPodRuntimeSnapshot waits until the vertex pod is running and reports numa container status. Unlike WaitForVertexPodRunning, it does not require every container in the pod to be ready.
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) CreateServingPipelineAndWait ¶ added in v1.5.0
func (*When) DaemonPodPortForward ¶ added in v0.5.4
func (*When) DeleteISBSvc ¶
func (*When) DeleteMonoVertexAndWait ¶ added in v1.3.0
func (*When) DeletePipelineAndWait ¶
func (*When) DeleteServingPipelineAndWait ¶ added in v1.5.0
func (*When) MonoVertexPodPortForward ¶ added in v1.5.0
func (*When) MvtxDaemonPodPortForward ¶ added in v1.5.0
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.
func (*When) SendMessageToMvTx ¶ added in v1.8.0
func (w *When) SendMessageToMvTx(monoVertex string, req HttpPostRequest) *When
SendMessageToMvTx sends msg to http source vertex in a MonoVertex.