@@ -1387,11 +1387,11 @@ var _ = Describe("Dataplane NodeSet Test", func() {
13871387 ansibleEE := GetAnsibleee (ansibleeeName )
13881388 g .Expect (ansibleEE .Spec .Template .Spec .Volumes ).To (HaveLen (3 ))
13891389 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [0 ].Name ).To (Equal ("bootstrap-combined-ca-bundle" ))
1390- g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].Name ).To (Equal ("ssh-key" ))
1390+ g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].Name ).To (Equal ("ssh-key-edpm-compute-nodeset " ))
13911391 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [2 ].Name ).To (Equal ("inventory" ))
13921392 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [0 ].VolumeSource .Secret .SecretName ).To (Equal ("combined-ca-bundle" ))
13931393 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].VolumeSource .Secret .SecretName ).To (Equal ("dataplane-ansible-ssh-private-key-secret" ))
1394- g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].VolumeSource .Secret .Items [0 ].Path ).To (Equal ("ssh_key " ))
1394+ g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].VolumeSource .Secret .Items [0 ].Path ).To (Equal ("ssh_key_edpm-compute-nodeset " ))
13951395 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].VolumeSource .Secret .Items [0 ].Key ).To (Equal ("ssh-privatekey" ))
13961396
13971397 }, th .Timeout , th .Interval ).Should (Succeed ())
@@ -1455,12 +1455,12 @@ var _ = Describe("Dataplane NodeSet Test", func() {
14551455 g .Expect (ansibleEE .Spec .Template .Spec .Volumes ).To (HaveLen (4 ))
14561456 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [0 ].Name ).To (Equal ("edpm-ansible" ))
14571457 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].Name ).To (Equal ("bootstrap-combined-ca-bundle" ))
1458- g .Expect (ansibleEE .Spec .Template .Spec .Volumes [2 ].Name ).To (Equal ("ssh-key" ))
1458+ g .Expect (ansibleEE .Spec .Template .Spec .Volumes [2 ].Name ).To (Equal ("ssh-key-edpm-compute-nodeset " ))
14591459 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [3 ].Name ).To (Equal ("inventory" ))
14601460 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [0 ].VolumeSource .PersistentVolumeClaim .ClaimName ).To (Equal ("edpm-ansible" ))
14611461 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [1 ].VolumeSource .Secret .SecretName ).To (Equal ("combined-ca-bundle" ))
14621462 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [2 ].VolumeSource .Secret .SecretName ).To (Equal ("dataplane-ansible-ssh-private-key-secret" ))
1463- g .Expect (ansibleEE .Spec .Template .Spec .Volumes [2 ].VolumeSource .Secret .Items [0 ].Path ).To (Equal ("ssh_key " ))
1463+ g .Expect (ansibleEE .Spec .Template .Spec .Volumes [2 ].VolumeSource .Secret .Items [0 ].Path ).To (Equal ("ssh_key_edpm-compute-nodeset " ))
14641464 g .Expect (ansibleEE .Spec .Template .Spec .Volumes [2 ].VolumeSource .Secret .Items [0 ].Key ).To (Equal ("ssh-privatekey" ))
14651465
14661466 }, th .Timeout , th .Interval ).Should (Succeed ())
@@ -1734,16 +1734,11 @@ var _ = Describe("Dataplane NodeSet Test", func() {
17341734 DeferCleanup (th .DeleteInstance , CreateDNSMasq (dnsMasqName , DefaultDNSMasqSpec ()))
17351735 DeferCleanup (th .DeleteInstance , CreateDataplaneNodeSet (testNodeSetName , nodeSetSpec ))
17361736
1737- // Create first deployment (will fail)
1737+ // Create only the first deployment here (will fail)
17381738 firstDeploymentSpec := DefaultDataPlaneDeploymentSpec ()
17391739 firstDeploymentSpec ["nodeSets" ] = []string {testNodeSetName .Name }
17401740 DeferCleanup (th .DeleteInstance , CreateDataplaneDeployment (dataplaneDeploymentName , firstDeploymentSpec ))
17411741
1742- // Create second deployment (will complete successfully)
1743- secondDeploymentSpec := DefaultDataPlaneDeploymentSpec ()
1744- secondDeploymentSpec ["nodeSets" ] = []string {testNodeSetName .Name }
1745- DeferCleanup (th .DeleteInstance , CreateDataplaneDeployment (secondDeploymentName , secondDeploymentSpec ))
1746-
17471742 CreateSSHSecret (dataplaneSSHSecretName )
17481743 CreateCABundleSecret (caBundleSecretName )
17491744 SimulateDNSMasqComplete (dnsMasqName )
@@ -1752,7 +1747,7 @@ var _ = Describe("Dataplane NodeSet Test", func() {
17521747 })
17531748
17541749 It ("Should show all deployments in status and process completed deployment" , func () {
1755- // Fail the first deployment
1750+ // Wait for first AnsibleEE job to be created, then fail it
17561751 Eventually (func (g Gomega ) {
17571752 ansibleeeName := types.NamespacedName {
17581753 Name : "bootstrap-" + dataplaneDeploymentName .Name + "-" + testNodeSetName .Name ,
@@ -1763,7 +1758,21 @@ var _ = Describe("Dataplane NodeSet Test", func() {
17631758 g .Expect (th .K8sClient .Status ().Update (th .Ctx , ansibleEE )).To (Succeed ())
17641759 }, th .Timeout , th .Interval ).Should (Succeed ())
17651760
1766- // Complete the second deployment
1761+ // Wait for the first deployment to be marked as failed
1762+ Eventually (func (g Gomega ) {
1763+ deployment := GetDataplaneDeployment (dataplaneDeploymentName )
1764+ g .Expect (deployment .Status .Conditions ).ToNot (BeEmpty ())
1765+ readyCondition := deployment .Status .Conditions .Get (condition .ReadyCondition )
1766+ g .Expect (readyCondition ).ToNot (BeNil ())
1767+ g .Expect (readyCondition .Status ).To (Equal (corev1 .ConditionFalse ))
1768+ }, th .Timeout , th .Interval ).Should (Succeed ())
1769+
1770+ // Now create the second deployment (will complete successfully)
1771+ secondDeploymentSpec := DefaultDataPlaneDeploymentSpec ()
1772+ secondDeploymentSpec ["nodeSets" ] = []string {testNodeSetName .Name }
1773+ DeferCleanup (th .DeleteInstance , CreateDataplaneDeployment (secondDeploymentName , secondDeploymentSpec ))
1774+
1775+ // Wait for second AnsibleEE job to be created, then complete it
17671776 Eventually (func (g Gomega ) {
17681777 ansibleeeName := types.NamespacedName {
17691778 Name : "bootstrap-" + secondDeploymentName .Name + "-" + testNodeSetName .Name ,
0 commit comments