From d5d59975ab3a9f47c7d48ecc5312b54dd038a3b7 Mon Sep 17 00:00:00 2001 From: Pierangelo Di Pilato Date: Mon, 10 Jan 2022 14:00:29 +0100 Subject: [PATCH] Avoid assuming no delivery spec configured for broker. This commit adds a delivery spec to `t2` to avoid assuming that the Broker delivery spec is empty by default. Signed-off-by: Pierangelo Di Pilato --- test/rekt/broker_test.go | 2 -- test/rekt/features/broker/control_plane.go | 20 ++++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test/rekt/broker_test.go b/test/rekt/broker_test.go index e1d580d294a..c31911c62ef 100644 --- a/test/rekt/broker_test.go +++ b/test/rekt/broker_test.go @@ -28,8 +28,6 @@ import ( "knative.dev/reconciler-test/pkg/k8s" "knative.dev/reconciler-test/pkg/knative" - "knative.dev/reconciler-test/pkg/eventshub" - "knative.dev/eventing/pkg/apis/eventing" "knative.dev/eventing/test/rekt/features/broker" b "knative.dev/eventing/test/rekt/resources/broker" diff --git a/test/rekt/features/broker/control_plane.go b/test/rekt/features/broker/control_plane.go index a2592181da2..a72dfbeca99 100644 --- a/test/rekt/features/broker/control_plane.go +++ b/test/rekt/features/broker/control_plane.go @@ -29,6 +29,15 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" + "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" + "knative.dev/pkg/injection/clients/dynamicclient" + "knative.dev/pkg/ptr" + "knative.dev/reconciler-test/pkg/environment" + "knative.dev/reconciler-test/pkg/feature" + "knative.dev/reconciler-test/pkg/state" + "knative.dev/reconciler-test/resources/svc" + v1 "knative.dev/eventing/pkg/apis/duck/v1" eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" eventingclientsetv1 "knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1" @@ -39,14 +48,6 @@ import ( brokerresources "knative.dev/eventing/test/rekt/resources/broker" "knative.dev/eventing/test/rekt/resources/delivery" triggerresources "knative.dev/eventing/test/rekt/resources/trigger" - "knative.dev/pkg/apis" - duckv1 "knative.dev/pkg/apis/duck/v1" - "knative.dev/pkg/injection/clients/dynamicclient" - "knative.dev/pkg/ptr" - "knative.dev/reconciler-test/pkg/environment" - "knative.dev/reconciler-test/pkg/feature" - "knative.dev/reconciler-test/pkg/state" - "knative.dev/reconciler-test/resources/svc" ) func ControlPlaneConformance(brokerName string) *feature.FeatureSet { @@ -318,6 +319,9 @@ func addControlPlaneDelivery(fs *feature.FeatureSet) { DeadLetterSink: new(duckv1.Destination), Retry: ptr.Int32(3), }, + t2DS: &v1.DeliverySpec{ + Retry: ptr.Int32(0), + }, t1FailCount: 3, // Should get event. t2FailCount: 1, // Should be dropped. }, {