@@ -61,6 +61,7 @@ var _ = Describe("OpenStackOperator controller", func() {
6161 DeferCleanup (k8sClient .Delete , ctx , CreateCertSecret (names .RootCAPublicName ))
6262 DeferCleanup (k8sClient .Delete , ctx , CreateCertSecret (names .RootCAInternalName ))
6363 DeferCleanup (k8sClient .Delete , ctx , CreateCertSecret (names .RootCAOvnName ))
64+ DeferCleanup (k8sClient .Delete , ctx , CreateCertSecret (names .RootCALibvirtName ))
6465 // create cert secrets for galera instances
6566 DeferCleanup (k8sClient .Delete , ctx , th .CreateCertSecret (names .DBCertName ))
6667 DeferCleanup (k8sClient .Delete , ctx , th .CreateCertSecret (names .DBCell1CertName ))
@@ -167,6 +168,19 @@ var _ = Describe("OpenStackOperator controller", func() {
167168 g .Expect (issuer ).Should (Not (BeNil ()))
168169 g .Expect (issuer .Spec .CA .SecretName ).Should (Equal (names .RootCAOvnName .Name ))
169170 }, timeout , interval ).Should (Succeed ())
171+ Eventually (func (g Gomega ) {
172+ // ca cert
173+ cert := crtmgr .GetCert (names .RootCALibvirtName )
174+ g .Expect (cert ).Should (Not (BeNil ()))
175+ g .Expect (cert .Spec .CommonName ).Should (Equal (names .RootCALibvirtName .Name ))
176+ g .Expect (cert .Spec .IsCA ).Should (BeTrue ())
177+ g .Expect (cert .Spec .IssuerRef .Name ).Should (Equal (names .SelfSignedIssuerName .Name ))
178+ g .Expect (cert .Spec .SecretName ).Should (Equal (names .RootCALibvirtName .Name ))
179+ // issuer
180+ issuer := crtmgr .GetIssuer (names .RootCALibvirtName )
181+ g .Expect (issuer ).Should (Not (BeNil ()))
182+ g .Expect (issuer .Spec .CA .SecretName ).Should (Equal (names .RootCALibvirtName .Name ))
183+ }, timeout , interval ).Should (Succeed ())
170184 })
171185
172186 It ("should create full ca bundle" , func () {
@@ -176,6 +190,8 @@ var _ = Describe("OpenStackOperator controller", func() {
176190 crtmgr .GetIssuer (names .RootCAInternalName )
177191 crtmgr .GetCert (names .RootCAOvnName )
178192 crtmgr .GetIssuer (names .RootCAOvnName )
193+ crtmgr .GetCert (names .RootCALibvirtName )
194+ crtmgr .GetIssuer (names .RootCALibvirtName )
179195
180196 Eventually (func (g Gomega ) {
181197 th .GetSecret (names .RootCAPublicName )
@@ -357,6 +373,19 @@ var _ = Describe("OpenStackOperator controller", func() {
357373 g .Expect (issuer ).Should (Not (BeNil ()))
358374 g .Expect (issuer .Spec .CA .SecretName ).Should (Equal (names .RootCAOvnName .Name ))
359375 }, timeout , interval ).Should (Succeed ())
376+ Eventually (func (g Gomega ) {
377+ // ca cert
378+ cert := crtmgr .GetCert (names .RootCALibvirtName )
379+ g .Expect (cert ).Should (Not (BeNil ()))
380+ g .Expect (cert .Spec .CommonName ).Should (Equal (names .RootCALibvirtName .Name ))
381+ g .Expect (cert .Spec .IsCA ).Should (BeTrue ())
382+ g .Expect (cert .Spec .IssuerRef .Name ).Should (Equal (names .SelfSignedIssuerName .Name ))
383+ g .Expect (cert .Spec .SecretName ).Should (Equal (names .RootCALibvirtName .Name ))
384+ // issuer
385+ issuer := crtmgr .GetIssuer (names .RootCALibvirtName )
386+ g .Expect (issuer ).Should (Not (BeNil ()))
387+ g .Expect (issuer .Spec .CA .SecretName ).Should (Equal (names .RootCALibvirtName .Name ))
388+ }, timeout , interval ).Should (Succeed ())
360389
361390 th .ExpectCondition (
362391 names .OpenStackControlplaneName ,
@@ -380,6 +409,8 @@ var _ = Describe("OpenStackOperator controller", func() {
380409 crtmgr .GetIssuer (names .RootCAInternalName )
381410 crtmgr .GetCert (names .RootCAOvnName )
382411 crtmgr .GetIssuer (names .RootCAOvnName )
412+ crtmgr .GetCert (names .RootCALibvirtName )
413+ crtmgr .GetIssuer (names .RootCALibvirtName )
383414
384415 Eventually (func (g Gomega ) {
385416 th .GetSecret (names .RootCAPublicName )
@@ -549,6 +580,19 @@ var _ = Describe("OpenStackOperator controller", func() {
549580 g .Expect (issuer ).Should (Not (BeNil ()))
550581 g .Expect (issuer .Spec .CA .SecretName ).Should (Equal (names .RootCAOvnName .Name ))
551582 }, timeout , interval ).Should (Succeed ())
583+ Eventually (func (g Gomega ) {
584+ // ca cert
585+ cert := crtmgr .GetCert (names .RootCALibvirtName )
586+ g .Expect (cert ).Should (Not (BeNil ()))
587+ g .Expect (cert .Spec .CommonName ).Should (Equal (names .RootCALibvirtName .Name ))
588+ g .Expect (cert .Spec .IsCA ).Should (BeTrue ())
589+ g .Expect (cert .Spec .IssuerRef .Name ).Should (Equal (names .SelfSignedIssuerName .Name ))
590+ g .Expect (cert .Spec .SecretName ).Should (Equal (names .RootCALibvirtName .Name ))
591+ // issuer
592+ issuer := crtmgr .GetIssuer (names .RootCALibvirtName )
593+ g .Expect (issuer ).Should (Not (BeNil ()))
594+ g .Expect (issuer .Spec .CA .SecretName ).Should (Equal (names .RootCALibvirtName .Name ))
595+ }, timeout , interval ).Should (Succeed ())
552596
553597 th .ExpectCondition (
554598 names .OpenStackControlplaneName ,
0 commit comments