@@ -933,6 +933,13 @@ var _ = Describe("OpenStackOperator controller", func() {
933933
934934 When ("The TLSe OpenStackControlplane instance switches to use a custom public issuer" , func () {
935935 BeforeEach (func () {
936+ // wait for default issuer
937+ Eventually (func (g Gomega ) {
938+ issuer := crtmgr .GetIssuer (names .RootCAPublicName )
939+ g .Expect (issuer ).Should (Not (BeNil ()))
940+ g .Expect (issuer .Labels ).Should (HaveKey (certmanager .RootCAIssuerPublicLabel ))
941+ }, timeout , interval ).Should (Succeed ())
942+
936943 // create custom issuer
937944 DeferCleanup (k8sClient .Delete , ctx , crtmgr .CreateIssuer (names .CustomIssuerName ))
938945 DeferCleanup (k8sClient .Delete , ctx , CreateCertSecret (names .CustomIssuerName ))
@@ -971,15 +978,15 @@ var _ = Describe("OpenStackOperator controller", func() {
971978 }, timeout , interval ).Should (Succeed ())
972979 })
973980
974- It ("should remove the certmanager.RootCAIssuerPublicLabel label from the defaultIssuer" , func () {
981+ It ("should add the certmanager.RootCAIssuerPublicLabel label to the defaultIssuer" , func () {
975982 Eventually (func (g Gomega ) {
976983 issuer := crtmgr .GetIssuer (names .RootCAPublicName )
977984 g .Expect (issuer ).Should (Not (BeNil ()))
978985 g .Expect (issuer .Labels ).Should (HaveKey (certmanager .RootCAIssuerPublicLabel ))
979986 }, timeout , interval ).Should (Succeed ())
980987 })
981988
982- It ("should add the certmanager.RootCAIssuerPublicLabel label to the customIssuer" , func () {
989+ It ("should remove the certmanager.RootCAIssuerPublicLabel label from the customIssuer" , func () {
983990 Eventually (func (g Gomega ) {
984991 issuer := crtmgr .GetIssuer (names .CustomIssuerName )
985992 g .Expect (issuer ).Should (Not (BeNil ()))
0 commit comments