From 6d2fe55a4d7fa3d02befa77d926103d174c3bce2 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Mon, 6 Mar 2023 13:25:38 +0100 Subject: [PATCH] Adapt to Conditions.Mirror() change The lib-common PR https://github.com/openstack-k8s-operators/lib-common/pull/204 fixed the behavior of Conditions.Mirror(). So it now returns any Unknown condition before any True condition (except ReadyCondition True). It seems that our tests incorrectly assumed that NovaAPI becomes Ready after the StatefulSet is Ready. But in reality NovaAPI creates the KeystoneEndpoint *after* the StatefulSet is ready. So these tests passed only because of the original bug in the Mirror code returned a True condition from NovaAPI when it had DeploymentReady=True and KeystoneEndpointReady=Unknown status. As the bug is fixed now the test needs to make sure the KeystoneEndpoints are ready before it can expect that NovaAPI is ready. --- api/go.mod | 2 +- api/go.sum | 13 +++++++++++-- go.mod | 6 +++--- go.sum | 12 ++++++------ test/functional/nova_controller_test.go | 10 +++++++++- test/functional/nova_multicell_test.go | 12 ++++++++++++ test/functional/nova_reconfiguration_test.go | 6 ++++++ 7 files changed, 48 insertions(+), 13 deletions(-) diff --git a/api/go.mod b/api/go.mod index 857366a09..fc8be88f9 100644 --- a/api/go.mod +++ b/api/go.mod @@ -3,7 +3,7 @@ module github.com/openstack-k8s-operators/nova-operator/api go 1.19 require ( - github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230227110324-8f0c518c552b + github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230307144813-39ed0da90b23 k8s.io/api v0.26.1 k8s.io/apimachinery v0.26.1 sigs.k8s.io/controller-runtime v0.14.4 diff --git a/api/go.sum b/api/go.sum index ff716cd57..17ce81ac7 100644 --- a/api/go.sum +++ b/api/go.sum @@ -63,6 +63,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -206,6 +207,7 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -218,11 +220,13 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/onsi/ginkgo/v2 v2.8.4 h1:gf5mIQ8cLFieruNLAdgijHF1PYfLphKm2dxxcUtcqK0= +github.com/onsi/ginkgo/v2 v2.8.4/go.mod h1:427dEDQZkDKsBvCjc2A/ZPefhKxsTTrsQegMlayL730= github.com/onsi/gomega v1.27.2 h1:SKU0CXeKE/WVgIV1T61kSa3+IRE8Ekrv9rdXDwwTqnY= +github.com/onsi/gomega v1.27.2/go.mod h1:5mR3phAHpkAVIDkHEUBY6HGVsU+cpcEscrGPB4oPlZI= github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230227110324-8f0c518c552b h1:prmJpppPg6kONSONIYxpVPKiOunjjfMIjUCiPSa9aag= -github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230227110324-8f0c518c552b/go.mod h1:wDUzrnAhtC0O99PYR8qQWQoGJzVQwGnfGepKzExCVk8= +github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230307144813-39ed0da90b23 h1:XPgJD+Z6iXzb4EmM/k3GtHBlCLEFM/ci8pGDyyZePRM= +github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230307144813-39ed0da90b23/go.mod h1:wDUzrnAhtC0O99PYR8qQWQoGJzVQwGnfGepKzExCVk8= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -272,6 +276,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= @@ -289,9 +294,12 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -601,6 +609,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go.mod b/go.mod index 45668dc19..576af3114 100644 --- a/go.mod +++ b/go.mod @@ -11,9 +11,9 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/openstack-k8s-operators/infra-operator/apis v0.0.0-20230221114633-d3cedda6974d github.com/openstack-k8s-operators/keystone-operator/api v0.0.0-20230228092947-37346b60ff49 - github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230227110324-8f0c518c552b - github.com/openstack-k8s-operators/lib-common/modules/database v0.0.0-20230227110324-8f0c518c552b - github.com/openstack-k8s-operators/lib-common/modules/test v0.0.0-20230227110324-8f0c518c552b + github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230307144813-39ed0da90b23 + github.com/openstack-k8s-operators/lib-common/modules/database v0.0.0-20230307144813-39ed0da90b23 + github.com/openstack-k8s-operators/lib-common/modules/test v0.0.0-20230307144813-39ed0da90b23 github.com/openstack-k8s-operators/mariadb-operator/api v0.0.0-20230227100533-e49b65b3e3df github.com/openstack-k8s-operators/nova-operator/api v0.0.0-20221209164002-f9e6b9363961 go.uber.org/zap v1.24.0 diff --git a/go.sum b/go.sum index 92c2c78d2..a03ea088b 100644 --- a/go.sum +++ b/go.sum @@ -237,14 +237,14 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.0.0-20230221114633-d3c github.com/openstack-k8s-operators/infra-operator/apis v0.0.0-20230221114633-d3cedda6974d/go.mod h1:5kG0Ct412tO3fNkZ5b3/BwwSsV7LkSNfOB/apUlbMJI= github.com/openstack-k8s-operators/keystone-operator/api v0.0.0-20230228092947-37346b60ff49 h1:H6PZmooeNMULdMl7lBQyRlth+RwSpw0v4XjBrsWVtMQ= github.com/openstack-k8s-operators/keystone-operator/api v0.0.0-20230228092947-37346b60ff49/go.mod h1:/0wxx2Q+nlu3hgPMXZRfHwR/rxXaHFJumzhFn26VvJM= -github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230227110324-8f0c518c552b h1:prmJpppPg6kONSONIYxpVPKiOunjjfMIjUCiPSa9aag= -github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230227110324-8f0c518c552b/go.mod h1:wDUzrnAhtC0O99PYR8qQWQoGJzVQwGnfGepKzExCVk8= -github.com/openstack-k8s-operators/lib-common/modules/database v0.0.0-20230227110324-8f0c518c552b h1:Rnb60/rN5Gg7EObGe3MsbvjBA8lQ5KjbzUfCANOB0Cc= -github.com/openstack-k8s-operators/lib-common/modules/database v0.0.0-20230227110324-8f0c518c552b/go.mod h1:vqeexlJ8MOtp4N72V9I4Zdz02l/g9jO+wehVJDMoOOY= +github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230307144813-39ed0da90b23 h1:XPgJD+Z6iXzb4EmM/k3GtHBlCLEFM/ci8pGDyyZePRM= +github.com/openstack-k8s-operators/lib-common/modules/common v0.0.0-20230307144813-39ed0da90b23/go.mod h1:wDUzrnAhtC0O99PYR8qQWQoGJzVQwGnfGepKzExCVk8= +github.com/openstack-k8s-operators/lib-common/modules/database v0.0.0-20230307144813-39ed0da90b23 h1:owML9ABtWPMcVMsaEcKpW12qrCXL6yjO+rtm7Yc2DvQ= +github.com/openstack-k8s-operators/lib-common/modules/database v0.0.0-20230307144813-39ed0da90b23/go.mod h1:vqeexlJ8MOtp4N72V9I4Zdz02l/g9jO+wehVJDMoOOY= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.0.0-20230215134634-d31141e5bbba h1:gwYazA5cJmHle3bXkpxz/iZcx6IZW5HmKaKQVgZPHxQ= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.0.0-20230215134634-d31141e5bbba/go.mod h1:9tj29SmyP9izLIEKj5E44F7M7a82UwcPdIufc3MQpcY= -github.com/openstack-k8s-operators/lib-common/modules/test v0.0.0-20230227110324-8f0c518c552b h1:8J2UqGpfB2RKFttUIGI2PiS7ZYYHdDH1Xd+kRBDQKWk= -github.com/openstack-k8s-operators/lib-common/modules/test v0.0.0-20230227110324-8f0c518c552b/go.mod h1:tyzJ76+tCchxmRqQxD4SIzN3wxKwSWnc/XmVC0bz3KE= +github.com/openstack-k8s-operators/lib-common/modules/test v0.0.0-20230307144813-39ed0da90b23 h1:Gfes1OAFn5NLu94xX5I2uhdmxZyLV6YdGybGuSxBCxQ= +github.com/openstack-k8s-operators/lib-common/modules/test v0.0.0-20230307144813-39ed0da90b23/go.mod h1:tyzJ76+tCchxmRqQxD4SIzN3wxKwSWnc/XmVC0bz3KE= github.com/openstack-k8s-operators/mariadb-operator/api v0.0.0-20230227100533-e49b65b3e3df h1:Ec7t8MVfLxZPcvWROqr1K7O0V1GAae995xlwojU1flY= github.com/openstack-k8s-operators/mariadb-operator/api v0.0.0-20230227100533-e49b65b3e3df/go.mod h1:PM7XY+2Uq+rVQ53I/+IbLFUH22b67xMgnBsKJhQmBcA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/test/functional/nova_controller_test.go b/test/functional/nova_controller_test.go index 3ac189888..bad9909f6 100644 --- a/test/functional/nova_controller_test.go +++ b/test/functional/nova_controller_test.go @@ -40,6 +40,7 @@ var _ = Describe("Nova controller", func() { var cell0DBSyncJobName types.NamespacedName var novaAPIName types.NamespacedName var novaAPIdeploymentName types.NamespacedName + var novaAPIKeystoneEndpointName types.NamespacedName var novaKeystoneServiceName types.NamespacedName var novaCell0ConductorStatefulSetName types.NamespacedName var apiTransportURLName types.NamespacedName @@ -96,6 +97,10 @@ var _ = Describe("Nova controller", func() { Namespace: namespace, Name: novaAPIName.Name, } + novaAPIKeystoneEndpointName = types.NamespacedName{ + Namespace: namespace, + Name: "nova", + } novaKeystoneServiceName = types.NamespacedName{ Namespace: namespace, Name: "nova", @@ -307,7 +312,7 @@ var _ = Describe("Nova controller", func() { Expect(api.Spec.ServiceUser).To(Equal("nova")) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) - + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.ExpectCondition( novaAPIName, ConditionGetterFunc(NovaAPIConditionGetter), @@ -336,6 +341,7 @@ var _ = Describe("Nova controller", func() { th.SimulateJobSuccess(cell0DBSyncJobName) th.SimulateStatefulSetReplicaReady(novaCell0ConductorStatefulSetName) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) scheduler := GetNovaScheduler(novaSchedulerName) Expect(scheduler.Spec.APIMessageBusSecretName).To(Equal("rabbitmq-secret")) @@ -524,6 +530,7 @@ var _ = Describe("Nova controller", func() { ) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.ExpectCondition( cell0ConductorName, @@ -697,6 +704,7 @@ var _ = Describe("Nova controller", func() { novaAPIdeploymentName, map[string][]string{namespace + "/internalapi": {"10.0.0.1"}}, ) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.ExpectCondition( novaName, diff --git a/test/functional/nova_multicell_test.go b/test/functional/nova_multicell_test.go index ebdffd480..c8a482aa9 100644 --- a/test/functional/nova_multicell_test.go +++ b/test/functional/nova_multicell_test.go @@ -87,6 +87,7 @@ var _ = Describe("Nova controller", func() { var cell2 Cell var novaAPIName types.NamespacedName var novaAPIdeploymentName types.NamespacedName + var novaAPIKeystoneEndpointName types.NamespacedName var novaKeystoneServiceName types.NamespacedName var novaSchedulerName types.NamespacedName var novaSchedulerStatefulSetName types.NamespacedName @@ -129,6 +130,10 @@ var _ = Describe("Nova controller", func() { Namespace: namespace, Name: "nova", } + novaAPIKeystoneEndpointName = types.NamespacedName{ + Namespace: namespace, + Name: "nova", + } novaSchedulerName = types.NamespacedName{ Namespace: namespace, Name: novaName.Name + "-scheduler", @@ -285,6 +290,8 @@ var _ = Describe("Nova controller", func() { condition.DeploymentReadyCondition, corev1.ConditionTrue, ) + + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.ExpectCondition( novaName, ConditionGetterFunc(NovaConditionGetter), @@ -300,6 +307,7 @@ var _ = Describe("Nova controller", func() { th.SimulateJobSuccess(cell0.CellDBSyncJobName) th.SimulateStatefulSetReplicaReady(cell0.ConductorStatefulSetName) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.SimulateMariaDBDatabaseCompleted(cell1.MariaDBDatabaseName) th.ExpectCondition( @@ -344,6 +352,7 @@ var _ = Describe("Nova controller", func() { th.SimulateJobSuccess(cell0.CellDBSyncJobName) th.SimulateStatefulSetReplicaReady(cell0.ConductorStatefulSetName) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.SimulateMariaDBDatabaseCompleted(cell1.MariaDBDatabaseName) th.SimulateTransportURLReady(cell1.TransportURLName) @@ -398,6 +407,7 @@ var _ = Describe("Nova controller", func() { th.SimulateJobSuccess(cell0.CellDBSyncJobName) th.SimulateStatefulSetReplicaReady(cell0.ConductorStatefulSetName) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.SimulateStatefulSetReplicaReady(novaSchedulerStatefulSetName) th.SimulateMariaDBDatabaseCompleted(cell1.MariaDBDatabaseName) th.SimulateTransportURLReady(cell1.TransportURLName) @@ -518,6 +528,7 @@ var _ = Describe("Nova controller", func() { // NovaAPI is still created GetNovaAPI(novaAPIName) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.ExpectCondition( novaName, ConditionGetterFunc(NovaConditionGetter), @@ -630,6 +641,7 @@ var _ = Describe("Nova controller", func() { // As cell0 is ready API is deployed th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.ExpectCondition( novaName, ConditionGetterFunc(NovaConditionGetter), diff --git a/test/functional/nova_reconfiguration_test.go b/test/functional/nova_reconfiguration_test.go index c8bcfc1a2..58e475d2b 100644 --- a/test/functional/nova_reconfiguration_test.go +++ b/test/functional/nova_reconfiguration_test.go @@ -39,6 +39,7 @@ func CreateNovaWith3CellsAndEnsureReady(namespace string) types.NamespacedName { var cell2 Cell var novaAPIName types.NamespacedName var novaAPIdeploymentName types.NamespacedName + var novaAPIKeystoneEndpointName types.NamespacedName var novaKeystoneServiceName types.NamespacedName var novaSchedulerName types.NamespacedName var novaSchedulerStatefulSetName types.NamespacedName @@ -59,6 +60,10 @@ func CreateNovaWith3CellsAndEnsureReady(namespace string) types.NamespacedName { Namespace: namespace, Name: novaAPIName.Name, } + novaAPIKeystoneEndpointName = types.NamespacedName{ + Namespace: namespace, + Name: "nova", + } novaKeystoneServiceName = types.NamespacedName{ Namespace: namespace, Name: "nova", @@ -143,6 +148,7 @@ func CreateNovaWith3CellsAndEnsureReady(namespace string) types.NamespacedName { th.SimulateStatefulSetReplicaReady(cell0.ConductorStatefulSetName) th.SimulateStatefulSetReplicaReady(novaAPIdeploymentName) + th.SimulateKeystoneEndpointReady(novaAPIKeystoneEndpointName) th.SimulateJobSuccess(cell1.CellDBSyncJobName) th.SimulateStatefulSetReplicaReady(cell1.ConductorStatefulSetName)