Skip to content

Commit

Permalink
[test] validate that TLSInputReadyCondition is ready when cert secret…
Browse files Browse the repository at this point in the history
…s are set
  • Loading branch information
stuggi authored and openshift-merge-bot[bot] committed Apr 22, 2024
1 parent 17fefe2 commit 13e4c8d
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/functional/nova_compute_ironic_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,13 @@ var _ = Describe("NovaCompute with ironic diver controller", func() {
DeferCleanup(k8sClient.Delete, ctx, th.CreateCABundleSecret(novaNames.CaBundleSecretName))
th.SimulateStatefulSetReplicaReady(cell1.NovaComputeStatefulSetName)

th.ExpectCondition(
cell1.NovaComputeName,
ConditionGetterFunc(NovaComputeConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(cell1.NovaComputeStatefulSetName)

// Check the resulting deployment fields
Expand Down
14 changes: 14 additions & 0 deletions test/functional/nova_metadata_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,13 @@ var _ = Describe("NovaMetadata controller", func() {
DeferCleanup(k8sClient.Delete, ctx, th.CreateCertSecret(novaNames.InternalCertSecretName))
th.SimulateStatefulSetReplicaReady(novaNames.MetadataStatefulSetName)

th.ExpectCondition(
novaNames.MetadataName,
ConditionGetterFunc(NovaMetadataConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(novaNames.MetadataStatefulSetName)

// Check the resulting deployment fields
Expand Down Expand Up @@ -999,6 +1006,13 @@ var _ = Describe("NovaMetadata controller", func() {
DeferCleanup(k8sClient.Delete, ctx, th.CreateCertSecret(novaNames.InternalCertSecretName))
th.SimulateStatefulSetReplicaReady(novaNames.MetadataStatefulSetName)

th.ExpectCondition(
novaNames.MetadataName,
ConditionGetterFunc(NovaMetadataConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(novaNames.MetadataStatefulSetName)

// Check the resulting deployment fields
Expand Down
14 changes: 14 additions & 0 deletions test/functional/nova_novncproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,13 @@ var _ = Describe("NovaNoVNCProxy controller", func() {
DeferCleanup(k8sClient.Delete, ctx, th.CreateCertSecret(novaNames.InternalCertSecretName))
th.SimulateStatefulSetReplicaReady(cell1.NoVNCProxyStatefulSetName)

th.ExpectCondition(
cell1.NoVNCProxyName,
ConditionGetterFunc(NoVNCProxyConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(cell1.NoVNCProxyStatefulSetName)

// Check the resulting deployment fields
Expand Down Expand Up @@ -879,6 +886,13 @@ var _ = Describe("NovaNoVNCProxy controller", func() {
DeferCleanup(k8sClient.Delete, ctx, th.CreateCertSecret(novaNames.InternalCertSecretName))
th.SimulateStatefulSetReplicaReady(cell1.NoVNCProxyStatefulSetName)

th.ExpectCondition(
cell1.NoVNCProxyName,
ConditionGetterFunc(NoVNCProxyConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(cell1.NoVNCProxyStatefulSetName)

// Check the resulting deployment fields
Expand Down
14 changes: 14 additions & 0 deletions test/functional/nova_scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,13 @@ var _ = Describe("NovaScheduler controller", func() {
DeferCleanup(k8sClient.Delete, ctx, th.CreateCABundleSecret(novaNames.CaBundleSecretName))
th.SimulateStatefulSetReplicaReady(novaNames.SchedulerStatefulSetName)

th.ExpectCondition(
novaNames.SchedulerName,
ConditionGetterFunc(NovaSchedulerConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(novaNames.SchedulerStatefulSetName)
// Check the resulting deployment fields
Expect(int(*ss.Spec.Replicas)).To(Equal(1))
Expand Down Expand Up @@ -803,6 +810,13 @@ var _ = Describe("NovaScheduler controller", func() {
DeferCleanup(k8sClient.Delete, ctx, th.CreateCABundleSecret(novaNames.CaBundleSecretName))
th.SimulateStatefulSetReplicaReady(novaNames.SchedulerStatefulSetName)

th.ExpectCondition(
novaNames.SchedulerName,
ConditionGetterFunc(NovaSchedulerConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(novaNames.SchedulerStatefulSetName)

// Check the resulting deployment fields
Expand Down
14 changes: 14 additions & 0 deletions test/functional/novaapi_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,13 @@ var _ = Describe("NovaAPI controller", func() {
th.SimulateStatefulSetReplicaReady(novaNames.APIStatefulSetName)
keystone.SimulateKeystoneEndpointReady(novaNames.APIKeystoneEndpointName)

th.ExpectCondition(
novaNames.APIName,
ConditionGetterFunc(NovaAPIConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(novaNames.APIStatefulSetName)
// Check the resulting deployment fields
Expect(int(*ss.Spec.Replicas)).To(Equal(1))
Expand Down Expand Up @@ -1072,6 +1079,13 @@ var _ = Describe("NovaAPI controller", func() {
th.SimulateStatefulSetReplicaReady(novaNames.APIStatefulSetName)
keystone.SimulateKeystoneEndpointReady(novaNames.APIKeystoneEndpointName)

th.ExpectCondition(
novaNames.APIName,
ConditionGetterFunc(NovaAPIConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(novaNames.APIStatefulSetName)
// Check the resulting deployment fields
Expect(int(*ss.Spec.Replicas)).To(Equal(1))
Expand Down
7 changes: 7 additions & 0 deletions test/functional/novaconductor_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,13 @@ var _ = Describe("NovaConductor controller", func() {
th.SimulateJobSuccess(cell0.DBSyncJobName)
th.SimulateStatefulSetReplicaReady(cell0.ConductorStatefulSetName)

th.ExpectCondition(
cell0.ConductorName,
ConditionGetterFunc(NovaConductorConditionGetter),
condition.TLSInputReadyCondition,
corev1.ConditionTrue,
)

ss := th.GetStatefulSet(cell0.ConductorStatefulSetName)

// Check the resulting deployment fields
Expand Down

0 comments on commit 13e4c8d

Please sign in to comment.