From 6ea0820f035a01fc38817dd0252eb4fcec031580 Mon Sep 17 00:00:00 2001 From: Olivier Michallat Date: Fri, 31 May 2024 17:15:14 -0700 Subject: [PATCH] Fix envtests --- controllers/k8ssandra/add_dc_test.go | 10 ++++++---- controllers/k8ssandra/stop_dc_test.go | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/controllers/k8ssandra/add_dc_test.go b/controllers/k8ssandra/add_dc_test.go index 71daec2b0..6c30a6855 100644 --- a/controllers/k8ssandra/add_dc_test.go +++ b/controllers/k8ssandra/add_dc_test.go @@ -50,8 +50,9 @@ func addDcSetupForSingleDc(ctx context.Context, t *testing.T, f *framework.Frame require := require.New(t) kc := &api.K8ssandraCluster{ ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: "add-dc-test", + Namespace: namespace, + Name: "add-dc-test", + Annotations: map[string]string{api.AutomatedUpdateAnnotation: string(api.AllowUpdateAlways)}, }, Spec: api.K8ssandraClusterSpec{ Cassandra: &api.CassandraClusterTemplate{ @@ -119,8 +120,9 @@ func addDcSetupForMultiDc(ctx context.Context, t *testing.T, f *framework.Framew require := require.New(t) kc := &api.K8ssandraCluster{ ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: "add-dc-test", + Namespace: namespace, + Name: "add-dc-test", + Annotations: map[string]string{api.AutomatedUpdateAnnotation: string(api.AllowUpdateAlways)}, }, Spec: api.K8ssandraClusterSpec{ Cassandra: &api.CassandraClusterTemplate{ diff --git a/controllers/k8ssandra/stop_dc_test.go b/controllers/k8ssandra/stop_dc_test.go index f25dd1784..812a46c3b 100644 --- a/controllers/k8ssandra/stop_dc_test.go +++ b/controllers/k8ssandra/stop_dc_test.go @@ -49,8 +49,9 @@ func stopDcTestSetup(t *testing.T, f *framework.Framework, ctx context.Context, kc := &api.K8ssandraCluster{ ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: "stop-dc-test", + Namespace: namespace, + Name: "stop-dc-test", + Annotations: map[string]string{api.AutomatedUpdateAnnotation: string(api.AllowUpdateAlways)}, }, Spec: api.K8ssandraClusterSpec{ Cassandra: &api.CassandraClusterTemplate{