diff --git a/test/e2e/helpers/parallel_test_helper.go b/test/e2e/helpers/parallel_test_helper.go index 4c4c4416cb8..895780b23f0 100644 --- a/test/e2e/helpers/parallel_test_helper.go +++ b/test/e2e/helpers/parallel_test_helper.go @@ -79,8 +79,12 @@ func ParallelTestHelper( // construct branch subscriber subPodName := fmt.Sprintf("parallel-%s-branch-%d-sub", tc.name, branchNumber) - subPod := resources.SequenceStepperPod(subPodName, subPodName) - client.CreatePodOrFail(subPod, testlib.WithService(subPodName)) + recordevents.DeployEventRecordOrFail( + ctx, + client, + subPodName, + recordevents.ReplyWithAppendedData(subPodName), + ) parallelBranches[branchNumber] = v1beta1.ParallelBranch{ Filter: &duckv1.Destination{ @@ -188,8 +192,12 @@ func ParallelV1TestHelper( // construct branch subscriber subPodName := fmt.Sprintf("parallel-%s-branch-%d-sub", tc.name, branchNumber) - subPod := resources.SequenceStepperPod(subPodName, subPodName) - client.CreatePodOrFail(subPod, testlib.WithService(subPodName)) + recordevents.DeployEventRecordOrFail( + ctx, + client, + subPodName, + recordevents.ReplyWithAppendedData(subPodName), + ) parallelBranches[branchNumber] = flowsv1.ParallelBranch{ Filter: &duckv1.Destination{ diff --git a/test/lib/resources/kube.go b/test/lib/resources/kube.go index d8f0658212b..c8ee0d2b0db 100644 --- a/test/lib/resources/kube.go +++ b/test/lib/resources/kube.go @@ -66,31 +66,6 @@ func WithLabelsForPod(labels map[string]string) PodOption { } } -// SequenceStepperPod creates a Pod that can be used as a step in testing Sequence. -// Note event data used in the test must be BaseData, and this Pod as a Subscriber will receive the event, -// and return a new event with eventMsgAppender added to data.Message. -func SequenceStepperPod(name, eventMsgAppender string) *corev1.Pod { - const imageName = "sequencestepper" - return &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Labels: map[string]string{"e2etest": string(uuid.NewUUID())}, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: imageName, - Image: pkgTest.ImagePath(imageName), - ImagePullPolicy: corev1.PullIfNotPresent, - Args: []string{ - "-msg-appender", - eventMsgAppender, - }, - }}, - RestartPolicy: corev1.RestartPolicyAlways, - }, - } -} - // EventFilteringPod creates a Pod that either filter or send the received CloudEvent func EventFilteringPod(name string, filter bool) *corev1.Pod { const imageName = "filterevents"