@@ -476,11 +476,11 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
476
476
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
477
477
478
478
/*
479
- EX - zone -> zone-1, zone-2, zone-3, zone-4, zone-5
479
+ EX - zone -> zone-1, zone-2, zone-3, zone-4
480
480
so topValStartIndex=1 and topValEndIndex=3 will fetch the 2nd and 3rd index from topology map string
481
481
*/
482
482
topValStartIndex := 0
483
- topValEndIndex := 5
483
+ topValEndIndex := 4
484
484
485
485
ginkgo .By ("Fetching allowed topology assigned to all zones" )
486
486
allowedTopologies = setSpecificAllowedTopology (allowedTopologies , topkeyStartIndex , topValStartIndex ,
@@ -511,24 +511,13 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
511
511
diskSize , storageclass , true )
512
512
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
513
513
volHandle := persistentVolumes [0 ].Spec .CSI .VolumeHandle
514
- defer func () {
515
- err := fpv .DeletePersistentVolumeClaim (ctx , client , pvclaim .Name , namespace )
516
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
517
- err = e2eVSphere .waitForCNSVolumeToBeDeleted (volHandle )
518
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
519
- }()
520
514
521
515
ginkgo .By ("Creating a Deployment using pvc" )
522
516
dep , err := createDeployment (ctx , client , 1 , labelsMap , nil , namespace ,
523
517
[]* v1.PersistentVolumeClaim {pvclaim }, execRWXCommandPod1 , false , busyBoxImageOnGcr )
524
518
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
525
519
podList , err := fdep .GetPodsForDeployment (ctx , client , dep )
526
520
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
527
- defer func () {
528
- ginkgo .By ("Delete Deployment" )
529
- err := client .AppsV1 ().Deployments (namespace ).Delete (ctx , dep .Name , metav1.DeleteOptions {})
530
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
531
- }()
532
521
533
522
ginkgo .By ("Verify the volume is accessible and Read/write is possible" )
534
523
output := readFileFromPod (namespace , podList .Items [0 ].Name , filePathPod1 )
@@ -543,17 +532,11 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
543
532
gomega .Expect (strings .Contains (output2 , "Hello message from Pod1" )).NotTo (gomega .BeFalse ())
544
533
545
534
ginkgo .By ("Creating service" )
546
- service := CreateService (namespace , client )
547
- defer func () {
548
- deleteService (namespace , client , service )
549
- }()
535
+ _ = CreateService (namespace , client )
550
536
551
537
ginkgo .By ("Creating statefulset" )
552
538
statefulset := createCustomisedStatefulSets (ctx , client , namespace , true , replicas , false , nil ,
553
539
false , true , "" , "" , storageclass , storageclass .Name )
554
- defer func () {
555
- fss .DeleteAllStatefulSets (ctx , client , namespace )
556
- }()
557
540
558
541
ginkgo .By ("Verify svc pv affinity, pvc annotation and pod node affinity" )
559
542
err = verifyPvcAnnotationPvAffinityPodAnnotationInSvc (ctx , client , statefulset , nil , dep , namespace ,
@@ -581,46 +564,19 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
581
564
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
582
565
583
566
ginkgo .By ("Create a dynamic volume snapshot" )
584
- volumeSnapshot , snapshotContent , snapshotCreated ,
585
- snapshotContentCreated , snapshotId , _ , err := createDynamicVolumeSnapshot (ctx , namespace , snapc ,
567
+ volumeSnapshot , _ , _ ,
568
+ _ , snapshotId , _ , err := createDynamicVolumeSnapshot (ctx , namespace , snapc ,
586
569
volumeSnapshotClass , pvclaim , volHandle , diskSize , true )
587
570
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
588
- defer func () {
589
- if snapshotContentCreated {
590
- err = deleteVolumeSnapshotContent (ctx , snapshotContent , snapc , pandoraSyncWaitTime )
591
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
592
- }
593
-
594
- if snapshotCreated {
595
- framework .Logf ("Deleting volume snapshot" )
596
- deleteVolumeSnapshotWithPandoraWait (ctx , snapc , namespace , volumeSnapshot .Name , pandoraSyncWaitTime )
597
-
598
- framework .Logf ("Wait till the volume snapshot is deleted" )
599
- err = waitForVolumeSnapshotContentToBeDeletedWithPandoraWait (ctx , snapc ,
600
- * volumeSnapshot .Status .BoundVolumeSnapshotContentName , pandoraSyncWaitTime )
601
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
602
- }
603
- }()
604
571
605
572
ginkgo .By ("Mark zone-2 for removal from wcp namespace" )
606
573
err = markZoneForRemovalFromWcpNs (vcRestSessionId , namespace ,
607
574
topologyAffinityDetails [topologyCategories [0 ]][1 ]) // this will fetch zone-2
608
575
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
609
576
610
577
ginkgo .By ("Restore a volume snapshot" )
611
- pvclaim2 , pvs2 , pod2 := verifyVolumeRestoreOperation (ctx , client , namespace , storageclass ,
578
+ _ , _ , pod2 := verifyVolumeRestoreOperation (ctx , client , namespace , storageclass ,
612
579
volumeSnapshot , diskSize , true )
613
- volHandle2 := pvs2 [0 ].Spec .CSI .VolumeHandle
614
- defer func () {
615
- ginkgo .By (fmt .Sprintf ("Deleting the pod %s in namespace %s" , pod2 .Name , namespace ))
616
- err = fpod .DeletePodWithWait (ctx , client , pod2 )
617
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
618
-
619
- err := fpv .DeletePersistentVolumeClaim (ctx , client , pvclaim2 .Name , namespace )
620
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
621
- err = e2eVSphere .waitForCNSVolumeToBeDeleted (volHandle2 )
622
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
623
- }()
624
580
625
581
ginkgo .By ("Perform scaling operation on statefulset. Increase the replica count to 9 when zone is marked" +
626
582
" for removal" )
@@ -634,7 +590,7 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
634
590
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
635
591
636
592
ginkgo .By ("Delete dynamic volume snapshot" )
637
- snapshotCreated , snapshotContentCreated , err = deleteVolumeSnapshot (ctx , snapc , namespace ,
593
+ _ , _ , err = deleteVolumeSnapshot (ctx , snapc , namespace ,
638
594
volumeSnapshot , pandoraSyncWaitTime , volHandle , snapshotId , true )
639
595
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
640
596
})
@@ -1369,7 +1325,6 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1369
1325
deployments := []* appsv1.Deployment {}
1370
1326
depSpecs := [][]* v1.PersistentVolumeClaim {
1371
1327
{pvcList [0 ], pvcList [1 ]},
1372
- {pvcList [2 ]},
1373
1328
}
1374
1329
for _ , pvcSet := range depSpecs {
1375
1330
dep , err := createDeployment (ctx , client , 1 , labelsMap , nil , namespace ,
0 commit comments