From 8b413625efc0c7d719da94951c07936c74b74032 Mon Sep 17 00:00:00 2001 From: Brendan Shephard Date: Tue, 13 Aug 2024 13:06:53 +1000 Subject: [PATCH] Allow for Jobs instead of AnsibleEE CR in kuttl Signed-off-by: Brendan Shephard --- .../openstackdataplanedeployment_controller_test.go | 6 +++--- .../dataplane-deploy-global-service-test/01-assert.yaml | 4 ++-- .../dataplane-deploy-global-service-test/02-assert.yaml | 8 +------- .../dataplane-deploy-multiple-secrets/02-assert.yaml | 6 +++--- .../kuttl/tests/dataplane-service-failure/00-assert.yaml | 1 - 5 files changed, 9 insertions(+), 16 deletions(-) diff --git a/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go b/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go index bfec131e2..499c8ba97 100644 --- a/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go +++ b/tests/functional/dataplane/openstackdataplanedeployment_controller_test.go @@ -1217,7 +1217,7 @@ var _ = Describe("Dataplane Deployment Test", func() { Namespace: dataplaneMultiNodesetDeploymentName.Namespace, } ansibleEE := GetAnsibleee(ansibleeeName) - ansibleEE.Status.JobStatus = ansibleeev1.JobStatusSucceeded + ansibleEE.Status.Succeeded = 1 g.Expect(th.K8sClient.Status().Update(th.Ctx, ansibleEE)).To(Succeed()) }, th.Timeout, th.Interval).Should(Succeed()) } @@ -1424,7 +1424,7 @@ var _ = Describe("Dataplane Deployment Test", func() { Namespace: dataplaneMultiNodesetDeploymentName.Namespace, } ansibleEE := GetAnsibleee(ansibleeeName) - ansibleEE.Status.JobStatus = ansibleeev1.JobStatusSucceeded + ansibleEE.Status.Succeeded = 1 g.Expect(th.K8sClient.Status().Update(th.Ctx, ansibleEE)).To(Succeed()) }, th.Timeout, th.Interval).Should(Succeed()) } @@ -1449,7 +1449,7 @@ var _ = Describe("Dataplane Deployment Test", func() { Namespace: dataplaneMultiNodesetDeploymentName.Namespace, } ansibleEE := GetAnsibleee(ansibleeeName) - ansibleEE.Status.JobStatus = ansibleeev1.JobStatusSucceeded + ansibleEE.Status.Succeeded = 1 g.Expect(th.K8sClient.Status().Update(th.Ctx, ansibleEE)).To(Succeed()) }, th.Timeout, th.Interval).Should(Succeed()) } diff --git a/tests/kuttl/tests/dataplane-deploy-global-service-test/01-assert.yaml b/tests/kuttl/tests/dataplane-deploy-global-service-test/01-assert.yaml index 584d5018d..7714ebbf3 100644 --- a/tests/kuttl/tests/dataplane-deploy-global-service-test/01-assert.yaml +++ b/tests/kuttl/tests/dataplane-deploy-global-service-test/01-assert.yaml @@ -149,7 +149,7 @@ spec: volumeMounts: - mountPath: /runner/env/ssh_key/ssh_key_edpm-compute-global name: ssh-key-edpm-compute-global - subPath: ssh_key_edpm-compute-global + subPath: ssh_key_edpm-compute-global - mountPath: /runner/inventory/inventory-0 name: inventory-0 subPath: inventory-0 @@ -157,7 +157,7 @@ spec: schedulerName: default-scheduler securityContext: {} serviceAccount: edpm-compute-global - serviceAccountName: edpm-compute-global + serviceAccountName: edpm-compute-global terminationGracePeriodSeconds: 30 volumes: - name: ssh-key-edpm-compute-global diff --git a/tests/kuttl/tests/dataplane-deploy-global-service-test/02-assert.yaml b/tests/kuttl/tests/dataplane-deploy-global-service-test/02-assert.yaml index 444501871..ff6eae8dd 100644 --- a/tests/kuttl/tests/dataplane-deploy-global-service-test/02-assert.yaml +++ b/tests/kuttl/tests/dataplane-deploy-global-service-test/02-assert.yaml @@ -70,7 +70,7 @@ metadata: namespace: openstack-kuttl-tests spec: nodeSets: - - edpm-compute-global + - edpm-multinodeset - edpm-compute-beta-nodeset --- apiVersion: batch/v1 @@ -102,8 +102,6 @@ spec: suspend: false template: metadata: - annotations: - k8s.v1.cni.cncf.io/networks: '[]' creationTimestamp: null labels: app: openstackansibleee @@ -151,7 +149,6 @@ spec: - mountPath: /runner/inventory/hosts name: inventory subPath: inventory - dnsPolicy: ClusterFirst restartPolicy: OnFailure schedulerName: default-scheduler securityContext: {} @@ -211,8 +208,6 @@ spec: suspend: false template: metadata: - annotations: - k8s.v1.cni.cncf.io/networks: '[]' creationTimestamp: null labels: app: openstackansibleee @@ -260,7 +255,6 @@ spec: - mountPath: /runner/inventory/hosts name: inventory subPath: inventory - dnsPolicy: ClusterFirst restartPolicy: OnFailure schedulerName: default-scheduler securityContext: {} diff --git a/tests/kuttl/tests/dataplane-deploy-multiple-secrets/02-assert.yaml b/tests/kuttl/tests/dataplane-deploy-multiple-secrets/02-assert.yaml index 520085517..2a8a8dd3a 100644 --- a/tests/kuttl/tests/dataplane-deploy-multiple-secrets/02-assert.yaml +++ b/tests/kuttl/tests/dataplane-deploy-multiple-secrets/02-assert.yaml @@ -189,7 +189,7 @@ spec: schedulerName: default-scheduler securityContext: {} serviceAccount: openstack-edpm-tls - serviceAccountName: openstack-edpm-tls + serviceAccountName: openstack-edpm-tls terminationGracePeriodSeconds: 30 volumes: - name: ssh-key-openstack-edpm-tls @@ -293,7 +293,7 @@ spec: volumeMounts: - mountPath: /runner/env/ssh_key/ssh_key_openstack-edpm-tls name: ssh-key-openstack-edpm-tls - subPath: ssh_key_openstack-edpm-tls + subPath: ssh_key_openstack-edpm-tls - mountPath: /runner/inventory/inventory name: inventory subPath: inventory @@ -301,7 +301,7 @@ spec: schedulerName: default-scheduler securityContext: {} serviceAccount: openstack-edpm-tls - serviceAccountName: openstack-edpm-tls + serviceAccountName: openstack-edpm-tls terminationGracePeriodSeconds: 30 volumes: - name: ssh-key-openstack-edpm-tls diff --git a/tests/kuttl/tests/dataplane-service-failure/00-assert.yaml b/tests/kuttl/tests/dataplane-service-failure/00-assert.yaml index bebaf7643..bb0104e8f 100644 --- a/tests/kuttl/tests/dataplane-service-failure/00-assert.yaml +++ b/tests/kuttl/tests/dataplane-service-failure/00-assert.yaml @@ -80,7 +80,6 @@ spec: edpm_service_type: failed-service - image: quay.io/openstack-k8s-operators/openstack-ansibleee-runner:latest imagePullPolicy: Always name: failed-service-edpm-compute-no-nodes-edpm-compute-no-nodes resources: {}