Skip to content

Commit

Permalink
[envtest]Use keystone helpers from keystone-operator
Browse files Browse the repository at this point in the history
This was necessary to remove a dependency cycle from lib-common
  • Loading branch information
gibizer committed Sep 25, 2023
1 parent bb4bc9a commit fda402f
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 59 deletions.
4 changes: 2 additions & 2 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/openstack-k8s-operators/ironic-operator/api
go 1.19

require (
github.com/onsi/ginkgo/v2 v2.12.0
github.com/onsi/ginkgo/v2 v2.12.1
github.com/onsi/gomega v1.27.10
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb
k8s.io/api v0.26.9
k8s.io/apimachinery v0.26.9
k8s.io/client-go v0.26.9
Expand Down
8 changes: 4 additions & 4 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ 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/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.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI=
github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ=
github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA=
github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxCMwNRnMjhhIDOWHJowi6q8G6koI=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216 h1:arYbQA6bLyXJkHm+6M6gPc4YpWMFjs5qkG16Yii4UDo=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:Ge7Yf6AUmjEvJK9AIW2bT5udLzBIcK59b1QxqymncaQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb h1:MRd/OrTTZeU/KXAzlIH003wPLmjZ4PHaQ7HisJC9hGY=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb/go.mod h1:kZS5rqVWBZeCyYor2PeQB9IEZ19mGaeL/to3x8F9OJg=
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=
Expand Down
25 changes: 11 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ go 1.19
require (
github.com/go-logr/logr v1.2.4
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0
github.com/onsi/ginkgo/v2 v2.12.0
github.com/onsi/ginkgo/v2 v2.12.1
github.com/onsi/gomega v1.27.10
github.com/openshift/api v3.9.0+incompatible
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230914145253-116f307c7875
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44
github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230901035810-610538e222c9
github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216
github.com/openstack-k8s-operators/lib-common/modules/database v0.1.1-0.20230919113507-d74c2f31d216
github.com/openstack-k8s-operators/lib-common/modules/test v0.1.2-0.20230919113507-d74c2f31d216
github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230913081601-9e4fc8aadad5
github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230925115904-772bbf00ffcf
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb
github.com/openstack-k8s-operators/lib-common/modules/database v0.1.1-0.20230925103424-7dcb605ea0bb
github.com/openstack-k8s-operators/lib-common/modules/test v0.1.2-0.20230925103424-7dcb605ea0bb
github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230918111825-8999b3b2dc3c
k8s.io/api v0.26.9
k8s.io/apimachinery v0.27.1
k8s.io/client-go v0.26.9
Expand All @@ -24,14 +24,9 @@ require (

require golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect

require (
github.com/cert-manager/cert-manager v1.11.5 // indirect
golang.org/x/mod v0.12.0 // indirect
sigs.k8s.io/gateway-api v0.6.0 // indirect
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cert-manager/cert-manager v1.11.5 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
Expand Down Expand Up @@ -59,7 +54,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230919113507-d74c2f31d216 // indirect
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230925103424-7dcb605ea0bb // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
Expand All @@ -68,6 +63,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.26.0
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.12.0 // indirect
Expand All @@ -85,6 +81,7 @@ require (
k8s.io/component-base v0.26.9 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
sigs.k8s.io/gateway-api v0.6.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -230,26 +230,26 @@ 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/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.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI=
github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ=
github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA=
github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxCMwNRnMjhhIDOWHJowi6q8G6koI=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230914145253-116f307c7875 h1:DUlCjbi3XxH66oL97MFZF5wgL28HdU+r8TkBZVw7WIc=
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230914145253-116f307c7875/go.mod h1:NgrvT3CKMu6fE8Nt1H79qHx11L3I7Bb2eItniM7c9ow=
github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3 h1:6VCz/ZBTJEQJTx4+z8UxLv3WITa4Bgx5CSP237wJ5xM=
github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3/go.mod h1:ta6w/29i4WuWkQp6I4cOLwMGQ5/vJI0y8Em7u+M34jo=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216 h1:arYbQA6bLyXJkHm+6M6gPc4YpWMFjs5qkG16Yii4UDo=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:Ge7Yf6AUmjEvJK9AIW2bT5udLzBIcK59b1QxqymncaQ=
github.com/openstack-k8s-operators/lib-common/modules/database v0.1.1-0.20230919113507-d74c2f31d216 h1:PykqfrahtBUbhIuM0IDRyrtVCOzy7jdEZz3yVEnwpp0=
github.com/openstack-k8s-operators/lib-common/modules/database v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:gdmDHoWrDtq8gfJHl20rQwe9vfzJJkY+KnvM6aD9+08=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230919113507-d74c2f31d216 h1:h76faqi4WAXBs3D2B0GLUdlCjS0dh78wRL0d5RZUwhk=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:GHi64tgyC75/vuT8Crda0yN5iCIYiSyS4bpzYJjX7MA=
github.com/openstack-k8s-operators/lib-common/modules/test v0.1.2-0.20230919113507-d74c2f31d216 h1:QyzzvG8iaDFwx6Lo44dCyf2tRtgk0sqniXjgJpiW32g=
github.com/openstack-k8s-operators/lib-common/modules/test v0.1.2-0.20230919113507-d74c2f31d216/go.mod h1:RfLOPJbmPzPZ4XHwwDc2tFbbw5zxZL15JFGwb5c6VaU=
github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230913081601-9e4fc8aadad5 h1:dQcSQuXfgzgOhc4v+zD0jE6WWhn6FHr5nALOjJBPxyI=
github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230913081601-9e4fc8aadad5/go.mod h1:mJyhm/YiQZaYhLvOuLng/ITpwx8HvsYVht+VotS1Ed8=
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44 h1:W2HZy+uk5fnVwvw3+/Jd/k7sNiVXCOd8SiV0dMvmjys=
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44/go.mod h1:fOJ95wMSymtfoellY/TFKcrzW6bu/nTCTzEnFEgCGCc=
github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230925115904-772bbf00ffcf h1:inyT3plUxpdFef3iZawwMK08uou1n+RSVEhyAQd7LFM=
github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230925115904-772bbf00ffcf/go.mod h1:Zyp4nHS/JggPqlsMNM8WZN546oYINvGVlHA1NivE3sU=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb h1:MRd/OrTTZeU/KXAzlIH003wPLmjZ4PHaQ7HisJC9hGY=
github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb/go.mod h1:kZS5rqVWBZeCyYor2PeQB9IEZ19mGaeL/to3x8F9OJg=
github.com/openstack-k8s-operators/lib-common/modules/database v0.1.1-0.20230925103424-7dcb605ea0bb h1:bGhIosetHt4+Kle0+0Vpa204v19u3k0p5Ox7CYD7jfw=
github.com/openstack-k8s-operators/lib-common/modules/database v0.1.1-0.20230925103424-7dcb605ea0bb/go.mod h1:RroLfB6Wstc+z7JVJY9o+6YPu+wBIzTAAfMpwhv7pDI=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230925103424-7dcb605ea0bb h1:DKxySUUtfA8hU1PpXgHbAA+kaa55zdKPlxSFOnvD898=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230925103424-7dcb605ea0bb/go.mod h1:+iJZo5alCeOGD/524hWWdlINA6zqY+MjfWT7cDcbvBE=
github.com/openstack-k8s-operators/lib-common/modules/test v0.1.2-0.20230925103424-7dcb605ea0bb h1:djVcLDXr+SL397W2meEiACDMOZNXciEc4ypLDnZ75wU=
github.com/openstack-k8s-operators/lib-common/modules/test v0.1.2-0.20230925103424-7dcb605ea0bb/go.mod h1:HtR62cEJ+x0WlcvNi/nfjhZ+UssC1zfxRA63qnVbxp4=
github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230918111825-8999b3b2dc3c h1:9R8T1WRwuPS5KMfsQWxAMSGPuJrGMJ7bODKK9dirhHA=
github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230918111825-8999b3b2dc3c/go.mod h1:xXHF/R/L0XamRHR/UkzlgzSTocBQ6GSQ2U16Q9Mf/bA=
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=
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/ironic_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ var _ = Describe("Ironic controller", func() {
),
)
DeferCleanup(
th.DeleteKeystoneAPI,
th.CreateKeystoneAPI(ironicNames.Namespace))
keystone.DeleteKeystoneAPI,
keystone.CreateKeystoneAPI(ironicNames.Namespace))
spec := GetDefaultIronicSpec()
spec["rpcTransport"] = "oslo"
spec["transportURLSecret"] = MessageBusSecretName
Expand Down
12 changes: 6 additions & 6 deletions tests/functional/ironicapi_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ var _ = Describe("IronicAPI controller", func() {
),
)
DeferCleanup(
th.DeleteKeystoneAPI,
th.CreateKeystoneAPI(ironicNames.Namespace))
keystone.DeleteKeystoneAPI,
keystone.CreateKeystoneAPI(ironicNames.Namespace))
spec := GetDefaultIronicAPISpec()
spec["rpcTransport"] = "oslo"
spec["transportURLSecret"] = MessageBusSecretName
Expand Down Expand Up @@ -139,8 +139,8 @@ var _ = Describe("IronicAPI controller", func() {
)
})
It("Creates Deployment and set status fields - Deployment is Ready", func() {
th.SimulateKeystoneEndpointReady(ironicNames.IronicName)
th.SimulateKeystoneServiceReady(ironicNames.IronicName)
keystone.SimulateKeystoneEndpointReady(ironicNames.IronicName)
keystone.SimulateKeystoneServiceReady(ironicNames.IronicName)
th.SimulateDeploymentReplicaReady(ironicNames.IronicName)
th.ExpectCondition(
ironicNames.APIName,
Expand Down Expand Up @@ -173,8 +173,8 @@ var _ = Describe("IronicAPI controller", func() {
}, timeout, interval).Should(Succeed())
})
It("Sets ReadyCondition and replica count", func() {
th.SimulateKeystoneServiceReady(ironicNames.IronicName)
th.SimulateKeystoneEndpointReady(ironicNames.IronicName)
keystone.SimulateKeystoneServiceReady(ironicNames.IronicName)
keystone.SimulateKeystoneEndpointReady(ironicNames.IronicName)
th.SimulateDeploymentReplicaReady(ironicNames.IronicName)
th.ExpectCondition(
ironicNames.APIName,
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/ironicconductor_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ var _ = Describe("IronicConductor controller", func() {
),
)
DeferCleanup(
th.DeleteKeystoneAPI,
th.CreateKeystoneAPI(ironicNames.Namespace))
keystone.DeleteKeystoneAPI,
keystone.CreateKeystoneAPI(ironicNames.Namespace))
spec := GetDefaultIronicConductorSpec()
spec["rpcTransport"] = "oslo"
spec["transportURLSecret"] = MessageBusSecretName
Expand Down
16 changes: 8 additions & 8 deletions tests/functional/ironicinspector_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ var _ = Describe("IronicInspector controller", func() {
),
)
DeferCleanup(
th.DeleteKeystoneAPI,
th.CreateKeystoneAPI(ironicNames.Namespace))
keystone.DeleteKeystoneAPI,
keystone.CreateKeystoneAPI(ironicNames.Namespace))
spec := GetDefaultIronicInspectorSpec()
spec["rpcTransport"] = "oslo"
DeferCleanup(
Expand Down Expand Up @@ -173,8 +173,8 @@ var _ = Describe("IronicInspector controller", func() {
th.SimulateMariaDBDatabaseCompleted(ironicNames.InspectorDatabaseName)
th.SimulateJobSuccess(ironicNames.InspectorDBSyncJobName)
th.SimulateStatefulSetReplicaReady(ironicNames.InspectorName)
th.SimulateKeystoneServiceReady(ironicNames.InspectorName)
th.SimulateKeystoneEndpointReady(ironicNames.InspectorName)
keystone.SimulateKeystoneServiceReady(ironicNames.InspectorName)
keystone.SimulateKeystoneEndpointReady(ironicNames.InspectorName)
th.ExpectCondition(
ironicNames.InspectorName,
ConditionGetterFunc(IronicInspectorConditionGetter),
Expand All @@ -189,8 +189,8 @@ var _ = Describe("IronicInspector controller", func() {
th.SimulateMariaDBDatabaseCompleted(ironicNames.InspectorDatabaseName)
th.SimulateJobSuccess(ironicNames.InspectorDBSyncJobName)
th.SimulateStatefulSetReplicaReady(ironicNames.InspectorName)
th.SimulateKeystoneServiceReady(ironicNames.InspectorName)
th.SimulateKeystoneEndpointReady(ironicNames.InspectorName)
keystone.SimulateKeystoneServiceReady(ironicNames.InspectorName)
keystone.SimulateKeystoneEndpointReady(ironicNames.InspectorName)
th.ExpectCondition(
ironicNames.InspectorName,
ConditionGetterFunc(IronicInspectorConditionGetter),
Expand All @@ -211,8 +211,8 @@ var _ = Describe("IronicInspector controller", func() {
th.SimulateMariaDBDatabaseCompleted(ironicNames.InspectorDatabaseName)
th.SimulateJobSuccess(ironicNames.InspectorDBSyncJobName)
th.SimulateStatefulSetReplicaReady(ironicNames.InspectorName)
th.SimulateKeystoneServiceReady(ironicNames.InspectorName)
th.SimulateKeystoneEndpointReady(ironicNames.InspectorName)
keystone.SimulateKeystoneServiceReady(ironicNames.InspectorName)
keystone.SimulateKeystoneEndpointReady(ironicNames.InspectorName)
th.ExpectCondition(
ironicNames.InspectorName,
ConditionGetterFunc(IronicInspectorConditionGetter),
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/ironicneutronagent_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var _ = Describe("IronicNeutronAgent controller", func() {
ctx,
CreateIronicSecret(ironicNames.Namespace, SecretName),
)
DeferCleanup(th.DeleteKeystoneAPI, th.CreateKeystoneAPI(ironicNames.Namespace))
DeferCleanup(keystone.DeleteKeystoneAPI, keystone.CreateKeystoneAPI(ironicNames.Namespace))
DeferCleanup(th.DeleteInstance, CreateIronicNeutronAgent(ironicNames.INAName, GetDefaultIronicNeutronAgentSpec()))
})
It("initializes Status fields", func() {
Expand Down Expand Up @@ -100,7 +100,7 @@ var _ = Describe("IronicNeutronAgent controller", func() {
DeferCleanup(th.DeleteInstance, CreateIronicNeutronAgent(ironicNames.INAName, GetDefaultIronicNeutronAgentSpec()))
th.GetTransportURL(ironicNames.INATransportURLName)
th.SimulateTransportURLReady(ironicNames.INATransportURLName)
DeferCleanup(th.DeleteKeystoneAPI, th.CreateKeystoneAPI(ironicNames.Namespace))
DeferCleanup(keystone.DeleteKeystoneAPI, keystone.CreateKeystoneAPI(ironicNames.Namespace))
})
It("is missing secret", func() {
th.ExpectConditionWithDetails(
Expand Down
10 changes: 7 additions & 3 deletions tests/functional/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ import (
keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1"
mariadbv1 "github.com/openstack-k8s-operators/mariadb-operator/api/v1beta1"

keystone_test "github.com/openstack-k8s-operators/keystone-operator/api/test/helpers"
"github.com/openstack-k8s-operators/lib-common/modules/test"
. "github.com/openstack-k8s-operators/lib-common/modules/test/helpers"
common_test "github.com/openstack-k8s-operators/lib-common/modules/test/helpers"
//+kubebuilder:scaffold:imports
)

Expand All @@ -61,7 +62,8 @@ var (
ctx context.Context
cancel context.CancelFunc
logger logr.Logger
th *TestHelper
th *common_test.TestHelper
keystone *keystone_test.TestHelper
ironicNames IronicNames
)

Expand Down Expand Up @@ -138,7 +140,9 @@ var _ = BeforeSuite(func() {
Expect(err).NotTo(HaveOccurred())
Expect(k8sClient).NotTo(BeNil())

th = NewTestHelper(ctx, k8sClient, timeout, interval, logger)
th = common_test.NewTestHelper(ctx, k8sClient, timeout, interval, logger)
Expect(th).NotTo(BeNil())
keystone = keystone_test.NewTestHelper(ctx, k8sClient, timeout, interval, logger)
Expect(th).NotTo(BeNil())

// Start the controller-manager if goroutine
Expand Down

0 comments on commit fda402f

Please sign in to comment.