diff --git a/tests/e2e/csi_snapshot_basic.go b/tests/e2e/csi_snapshot_basic.go index 77580bf9a1..5951162ac4 100644 --- a/tests/e2e/csi_snapshot_basic.go +++ b/tests/e2e/csi_snapshot_basic.go @@ -4849,8 +4849,8 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() { 4. Volume restore 5. snapshot create/delete workflow */ - ginkgo.It("[block-vanilla-snapshot][tkg-snapshot][supervisor-snapshot] Scale-up creation of snapshots across multiple "+ - "volumes", ginkgo.Label(p0, block, vanilla, snapshot, tkg, stable), func() { + ginkgo.It("[block-vanilla-snapshot][tkg-snapshot][supervisor-snapshot] Scale-up creation of snapshots "+ + "across multiple volumes", ginkgo.Label(p0, block, vanilla, snapshot, tkg, stable), func() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/tests/e2e/snapshot_vmservice_vm.go b/tests/e2e/snapshot_vmservice_vm.go index feb4612434..63e67432b6 100644 --- a/tests/e2e/snapshot_vmservice_vm.go +++ b/tests/e2e/snapshot_vmservice_vm.go @@ -220,7 +220,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 11. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Taking snapshot of a vm service vm attached to a dynamic volume", func() { + ginkgo.It("Taking snapshot of a vm service vm attached "+ + "to a dynamic volume", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -378,7 +380,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 12. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Taking snapshot of a vm service vm attached to a static volume", func() { + ginkgo.It("Taking snapshot of a vm service vm attached "+ + "to a static volume", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -515,7 +519,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Restoring snapshot and attaching it to a vm service vm", func() { + ginkgo.It("Restoring snapshot and attaching it to a "+ + "vm service vm", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -690,7 +696,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 17. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Restoring multiple snapshots and attaching it to a single vm service vm", func() { + ginkgo.It("Restoring multiple snapshots and attaching "+ + "it to a single vm service vm", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -896,7 +904,8 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 19. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Offline volume expansion and later attaching it to a vm service vm", func() { + ginkgo.It("Offline volume expansion and later attaching "+ + "it to a vm service vm", ginkgo.Label(p0, block, wcp, snapshot), func() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -1138,7 +1147,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 17. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Attaching new restore snapshots to vm service vms", func() { + ginkgo.It("Attaching new restore snapshots to vm service "+ + "vms", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -1449,7 +1460,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { Confirm that the Pod reaches the running state and that read and write operations can be performed on the volume. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Attaching same volume to a pod and vm service vm", func() { + ginkgo.It("Attaching same volume to a pod and vm service "+ + "vm", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -1649,7 +1662,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 18. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Power on and off operation on a vm service vm with snapshot", func() { + ginkgo.It("Power on and off operation on a vm service "+ + "vm with snapshot", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -1867,7 +1882,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 25. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("vCenter services down operation during snapshot creation and restoration taken for a vm service vm", func() { + ginkgo.It("vCenter services down operation during snapshot creation "+ + "and restoration taken for a vm service vm", ginkgo.Label(p1, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -2113,7 +2130,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Storage vmotion of a vm from one datastore to another with snapshot", func() { + ginkgo.It("Storage vmotion of a vm from one datastore to another "+ + "with snapshot", ginkgo.Label(p1, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -2266,7 +2285,7 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { ginkgo.By("Relocate FCD to another datastore") dsRefDest = getDsMoRefFromURL(ctx, destDsUrl) _, err = e2eVSphere.cnsRelocateVolume(e2eVSphere, ctx, restoreVolHandle, dsRefDest, true) - //gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) ginkgo.By("Create volume snapshot") volumeSnapshot2, snapshotContent2, snapshotCreated2, @@ -2359,7 +2378,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 14. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Creation of multiple vm service vms and attaching it to restore snapshots", func() { + ginkgo.It("Creation of multiple vm service vms and attaching "+ + "it to restore snapshots", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -2645,7 +2666,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 21. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("Recurring taking snapshots of a vm service vm", func() { + ginkgo.It("Recurring taking snapshots of a vm service "+ + "vm", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -2891,7 +2914,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("[stretched-svc] Taking snapshot of a vm service vm in a stretched supervsior cluster", ginkgo.Label(p0, wcp, core), func() { + ginkgo.It("[stretched-svc] Taking snapshot of a vm service vm "+ + "in a stretched supervisor cluster", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() topologyHaMap := GetAndExpectStringEnvVar(topologyHaMap) @@ -3111,7 +3136,9 @@ var _ bool = ginkgo.Describe("[vmsvc] vm service with csi vol tests", func() { 25. Cleanup: Execute and verify the steps mentioned in the Delete snapshot mandatory checks */ - ginkgo.It("[stretched-svc] Restoring snapshots and attaching it to a new vm service vms in a stretched supervisor env", ginkgo.Label(p0, wcp, core), func() { + ginkgo.It("[stretched-svc] Restoring snapshots and attaching it to a new vm service"+ + "vms in a stretched supervisor env", ginkgo.Label(p0, block, wcp, snapshot), func() { + ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/tests/e2e/vmservice_utils.go b/tests/e2e/vmservice_utils.go index 6656689eb0..5f8816f26a 100644 --- a/tests/e2e/vmservice_utils.go +++ b/tests/e2e/vmservice_utils.go @@ -959,8 +959,14 @@ func performVolumeLifecycleActionForVmServiceVM(ctx context.Context, client clie []*v1.PersistentVolumeClaim{pvc})).NotTo(gomega.HaveOccurred()) } +/* + updateVmWithNewPvc util updates vm volume attachment list byt adding new + +volumes to the vm +*/ func updateVmWithNewPvc(ctx context.Context, vmopC ctlrclient.Client, vmName string, namespace string, newPvc *v1.PersistentVolumeClaim) error { + // Fetch the existing VM vm := &vmopv1.VirtualMachine{} err := vmopC.Get(ctx, ctlrclient.ObjectKey{Name: vmName, Namespace: namespace}, vm)