From 19dd70ce1a786bce1ffc6aaefa31bd04874a0ef9 Mon Sep 17 00:00:00 2001 From: Grzegorz Grasza Date: Mon, 2 Dec 2024 09:27:12 +0100 Subject: [PATCH] The new unit test shell is running --- tests/functional/barbican_controller_test.go | 24 ++++---------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/tests/functional/barbican_controller_test.go b/tests/functional/barbican_controller_test.go index 0879fa9..1f3bdb2 100644 --- a/tests/functional/barbican_controller_test.go +++ b/tests/functional/barbican_controller_test.go @@ -441,14 +441,11 @@ var _ = Describe("Barbican controller", func() { infra.SimulateTransportURLReady(barbicanTest.BarbicanTransportURL) DeferCleanup(keystone.DeleteKeystoneAPI, keystone.CreateKeystoneAPI(barbicanTest.Instance.Namespace)) mariadb.SimulateMariaDBAccountCompleted(barbicanTest.BarbicanDatabaseAccount) - //mariadb.SimulateMariaDBTLSDatabaseCompleted(barbicanTest.BarbicanDatabaseName) + mariadb.SimulateMariaDBDatabaseCompleted(barbicanTest.BarbicanDatabaseName) th.SimulateJobSuccess(barbicanTest.BarbicanDBSync) }) It("Creates BarbicanAPI", func() { - /*DeferCleanup(k8sClient.Delete, ctx, th.CreateCABundleSecret(barbicanTest.CABundleSecret)) - DeferCleanup(k8sClient.Delete, ctx, th.CreateCertSecret(barbicanTest.InternalCertSecret)) - DeferCleanup(k8sClient.Delete, ctx, th.CreateCertSecret(barbicanTest.PublicCertSecret))*/ keystone.SimulateKeystoneEndpointReady(barbicanTest.BarbicanKeystoneEndpoint) th.ExpectCondition( @@ -464,24 +461,13 @@ var _ = Describe("Barbican controller", func() { // Check the resulting deployment fields Expect(int(*d.Spec.Replicas)).To(Equal(1)) - Expect(d.Spec.Template.Spec.Volumes).To(HaveLen(6)) + Expect(d.Spec.Template.Spec.Volumes).To(HaveLen(3)) Expect(d.Spec.Template.Spec.Containers).To(HaveLen(2)) - // cert deployment volumes - /*th.AssertVolumeExists(barbicanTest.CABundleSecret.Name, d.Spec.Template.Spec.Volumes) - th.AssertVolumeExists(barbicanTest.InternalCertSecret.Name, d.Spec.Template.Spec.Volumes) - th.AssertVolumeExists(barbicanTest.PublicCertSecret.Name, d.Spec.Template.Spec.Volumes) - - // cert volumeMounts container := d.Spec.Template.Spec.Containers[1] - th.AssertVolumeMountExists(barbicanTest.InternalCertSecret.Name, "tls.key", container.VolumeMounts) - th.AssertVolumeMountExists(barbicanTest.InternalCertSecret.Name, "tls.crt", container.VolumeMounts) - th.AssertVolumeMountExists(barbicanTest.PublicCertSecret.Name, "tls.key", container.VolumeMounts) - th.AssertVolumeMountExists(barbicanTest.PublicCertSecret.Name, "tls.crt", container.VolumeMounts) - th.AssertVolumeMountExists(barbicanTest.CABundleSecret.Name, "tls-ca-bundle.pem", container.VolumeMounts) - Expect(container.ReadinessProbe.HTTPGet.Scheme).To(Equal(corev1.URISchemeHTTPS)) - Expect(container.LivenessProbe.HTTPGet.Scheme).To(Equal(corev1.URISchemeHTTPS))*/ + Expect(container.ReadinessProbe.HTTPGet.Scheme).To(Equal(corev1.URISchemeHTTP)) + Expect(container.LivenessProbe.HTTPGet.Scheme).To(Equal(corev1.URISchemeHTTP)) }) It("should create config-data and scripts ConfigMaps", func() { @@ -489,7 +475,7 @@ var _ = Describe("Barbican controller", func() { Expect(cf).ShouldNot(BeNil()) conf := cf.Data["my.cnf"] Expect(conf).To( - ContainSubstring("[client]\nssl-ca=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem\nssl=1")) + ContainSubstring("[client]\nssl=0")) }) })