Skip to content

Commit

Permalink
Update functional test to simulate LB IP
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
  • Loading branch information
stuggi authored and openshift-merge-bot[bot] committed Jun 22, 2024
1 parent bb33f18 commit 3ddf4d1
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/google/go-cmp v0.6.0
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621132334-5d50a334416d
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621144804-4b3c1fd10960
github.com/robfig/cron/v3 v3.0.1
k8s.io/api v0.28.11
k8s.io/apimachinery v0.28.11
Expand Down
4 changes: 2 additions & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621132334-5d50a334416d h1:dbqt0GgRdUIpg+xi+wixq1VOb+BGbflHGmUIAuwlyBk=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621132334-5d50a334416d/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621144804-4b3c1fd10960 h1:9UpWmnaLZeN237m9YIHy6KxsSV3yPatNXryW2qabVKs=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621144804-4b3c1fd10960/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/onsi/gomega v1.33.1
github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240619095729-12880d8dcd1a
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240619130146-b17a4c95ef7d
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621132334-5d50a334416d
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621144804-4b3c1fd10960
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240621132334-5d50a334416d
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240621132334-5d50a334416d
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240618160206-098a347e0f61
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240619095729-1
github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240619095729-12880d8dcd1a/go.mod h1:g9AEIebQRkTchWZlAvzq77OfzZxfvr1g5Ppm1BJmTBU=
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240619130146-b17a4c95ef7d h1:Vjp9zYmJ3aOQr5rlUKdJpd1BrPYCXfW+MfauKgxh1Cc=
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240619130146-b17a4c95ef7d/go.mod h1:FrtE6oanVDCaPN1PKHBGAMyuVpoDcj20IzWXT1/tQqU=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621132334-5d50a334416d h1:dbqt0GgRdUIpg+xi+wixq1VOb+BGbflHGmUIAuwlyBk=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621132334-5d50a334416d/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621144804-4b3c1fd10960 h1:9UpWmnaLZeN237m9YIHy6KxsSV3yPatNXryW2qabVKs=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240621144804-4b3c1fd10960/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240621132334-5d50a334416d h1:5FLlEWwXcWUQOJCqaPJE9aaIENq6wS7KAtMSWDYrx8c=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240621132334-5d50a334416d/go.mod h1:zuPcZ5Kopr15AdfxvA0xqKIIGCZ0XbSe/0VHNKuvbEE=
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240621132334-5d50a334416d h1:azWTztnRRU6gM8SlkZFCeQtxOQ0p6gZsLRYSB23+B98=
Expand Down
1 change: 1 addition & 0 deletions test/functional/nova_metadata_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ var _ = Describe("NovaMetadata controller", func() {

It("creates LoadBalancer service", func() {
th.SimulateStatefulSetReplicaReady(novaNames.MetadataStatefulSetName)
th.SimulateLoadBalancerServiceIP(novaNames.InternalNovaMetadataServiceName)

// As the internal endpoint is configured via service override to
// be a LoadBalancer Service with MetalLB annotations
Expand Down
1 change: 1 addition & 0 deletions test/functional/nova_novncproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ var _ = Describe("NovaNoVNCProxy controller", func() {
})

It("creates LoadBalancer service", func() {
th.SimulateLoadBalancerServiceIP(types.NamespacedName{Namespace: cell1.NoVNCProxyName.Namespace, Name: "nova-novncproxy-cell1-public"})
th.SimulateStatefulSetReplicaReady(cell1.NoVNCProxyStatefulSetName)

// As the endpoint has service override configured it
Expand Down
9 changes: 3 additions & 6 deletions test/functional/novaapi_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ var _ = Describe("NovaAPI controller", func() {

It("creates LoadBalancer services", func() {
th.SimulateStatefulSetReplicaReady(novaNames.APIStatefulSetName)
th.SimulateLoadBalancerServiceIP(novaNames.InternalNovaServiceName)

keystone.SimulateKeystoneEndpointReady(novaNames.APIKeystoneEndpointName)

Expand Down Expand Up @@ -635,9 +636,6 @@ var _ = Describe("NovaAPI controller", func() {
HaveKeyWithValue("service", "nova-api"))
Expect(service.Spec.Type).To(Equal(corev1.ServiceTypeClusterIP))

th.SimulateStatefulSetReplicaReady(novaNames.APIStatefulSetName)
keystone.SimulateKeystoneEndpointReady(types.NamespacedName{Namespace: novaNames.APIName.Namespace, Name: "nova"})

// it registers the endpointURL as the public endpoint and svc
// for the internal
keystoneEndpoint := keystone.GetKeystoneEndpoint(types.NamespacedName{Namespace: novaNames.APIName.Namespace, Name: "nova"})
Expand Down Expand Up @@ -703,6 +701,8 @@ var _ = Describe("NovaAPI controller", func() {

It("creates LoadBalancer services", func() {
th.SimulateStatefulSetReplicaReady(novaNames.APIStatefulSetName)
th.SimulateLoadBalancerServiceIP(novaNames.PublicNovaServiceName)
th.SimulateLoadBalancerServiceIP(novaNames.InternalNovaServiceName)

keystone.SimulateKeystoneEndpointReady(novaNames.APIKeystoneEndpointName)

Expand Down Expand Up @@ -733,9 +733,6 @@ var _ = Describe("NovaAPI controller", func() {
HaveKeyWithValue("core.openstack.org/ingress_create", "false"))
Expect(service.Spec.Type).To(Equal(corev1.ServiceTypeLoadBalancer))

th.SimulateStatefulSetReplicaReady(novaNames.APIStatefulSetName)
keystone.SimulateKeystoneEndpointReady(types.NamespacedName{Namespace: novaNames.APIName.Namespace, Name: "nova"})

// it registers the endpointURL as the public endpoint and svc
// for the internal
keystoneEndpoint := keystone.GetKeystoneEndpoint(types.NamespacedName{Namespace: novaNames.APIName.Namespace, Name: "nova"})
Expand Down

0 comments on commit 3ddf4d1

Please sign in to comment.