From beb922367831499b9aea9b39964074b6cc861b1b Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Mon, 3 Apr 2023 14:20:19 +0200 Subject: [PATCH] Adapt to lib-common fix PR #214 In https://github.com/openstack-k8s-operators/lib-common/pull/214 lib-common added new network annotations to the pods. Adapt our tests to the extra annotation. --- test/functional/nova_metadata_controller_test.go | 10 ++++++---- test/functional/nova_scheduler_test.go | 10 ++++++---- test/functional/novaapi_controller_test.go | 10 ++++++---- test/functional/novaconductor_controller_test.go | 10 ++++++---- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/test/functional/nova_metadata_controller_test.go b/test/functional/nova_metadata_controller_test.go index 3c2d9b367..2c80db4d6 100644 --- a/test/functional/nova_metadata_controller_test.go +++ b/test/functional/nova_metadata_controller_test.go @@ -349,8 +349,9 @@ var _ = Describe("NovaMetadata controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To( @@ -385,8 +386,9 @@ var _ = Describe("NovaMetadata controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To( diff --git a/test/functional/nova_scheduler_test.go b/test/functional/nova_scheduler_test.go index 36199a2df..d8220e3e3 100644 --- a/test/functional/nova_scheduler_test.go +++ b/test/functional/nova_scheduler_test.go @@ -331,8 +331,9 @@ var _ = Describe("NovaScheduler controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To( @@ -367,8 +368,9 @@ var _ = Describe("NovaScheduler controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To( diff --git a/test/functional/novaapi_controller_test.go b/test/functional/novaapi_controller_test.go index 2e25cce32..709be3ffa 100644 --- a/test/functional/novaapi_controller_test.go +++ b/test/functional/novaapi_controller_test.go @@ -432,8 +432,9 @@ var _ = Describe("NovaAPI controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To( @@ -468,8 +469,9 @@ var _ = Describe("NovaAPI controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To( diff --git a/test/functional/novaconductor_controller_test.go b/test/functional/novaconductor_controller_test.go index 7eafe2a7c..7173a0baf 100644 --- a/test/functional/novaconductor_controller_test.go +++ b/test/functional/novaconductor_controller_test.go @@ -555,8 +555,9 @@ var _ = Describe("NovaConductor controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To( @@ -592,8 +593,9 @@ var _ = Describe("NovaConductor controller", func() { expectedAnnotation, err := json.Marshal( []networkv1.NetworkSelectionElement{ { - Name: "internalapi", - Namespace: namespace, + Name: "internalapi", + Namespace: namespace, + InterfaceRequest: "internalapi", }}) Expect(err).ShouldNot(HaveOccurred()) Expect(ss.Spec.Template.ObjectMeta.Annotations).To(