Skip to content

Commit 51701ef

Browse files
authored
EF UTS test code fixes for TKG (#3643)
1 parent c1e90f3 commit 51701ef

File tree

5 files changed

+41
-36
lines changed

5 files changed

+41
-36
lines changed

tests/e2e/csi_snapshot_basic.go

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,9 +1667,10 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
16671667
8. Ensure the pvc with source as snapshot creates successfully and is bound
16681668
9. Cleanup the snapshot, pvcs and ns
16691669
*/
1670-
ginkgo.It("[block-vanilla-snapshot][cf-vanilla-block][tkg-snapshot][ef-vks-snapshot] Delete the "+
1671-
"namespace hosting the pvcs and volume-snapshots and recover the data using "+
1672-
"snapshot-content", ginkgo.Label(p0, block, vanilla, snapshot, tkg, stable, vc80), func() {
1670+
ginkgo.It("[block-vanilla-snapshot][cf-vanilla-block][tkg-snapshot]"+
1671+
"[ef-vks-snapshot-f] Delete the namespace hosting the pvcs and volume-snapshots "+
1672+
"and recover the data using snapshot-content", ginkgo.Label(p0, block, vanilla,
1673+
snapshot, tkg, stable, vc80), func() {
16731674

16741675
ctx, cancel := context.WithCancel(context.Background())
16751676
defer cancel()
@@ -2277,8 +2278,9 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
22772278
10. Verify if the new pod attaches to the PV created in step-8
22782279
11. Cleanup the sts and the snapshot + pv that was left behind in step-7
22792280
*/
2280-
ginkgo.It("[ef-vanilla-block][ef-wcp-snapshot][block-vanilla-snapshot][tkg-snapshot][supervisor-snapshot]"+
2281-
"[ef-vks-snapshot] Snapshot workflow for statefulsets", ginkgo.Label(p0, block, vanilla, snapshot, wcp,
2281+
ginkgo.It("[ef-vanilla-block][ef-wcp-snapshot][block-vanilla-snapshot][tkg-snapshot]"+
2282+
"[supervisor-snapshot][ef-vks-snapshot-f] Snapshot workflow for "+
2283+
"statefulsets", ginkgo.Label(p0, block, vanilla, snapshot, wcp,
22822284
tkg, vc80), func() {
22832285
ctx, cancel := context.WithCancel(context.Background())
22842286
defer cancel()
@@ -4893,9 +4895,9 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
48934895
2. Create Snapshot class and take a snapshot of the volume
48944896
3. Cleanup of snapshot, pvc and sc
48954897
*/
4896-
ginkgo.It("[pq-wcp-snpt][block-vanilla-snapshot][tkg-snapshot][supervisor-snapshot][ef-vks-snapshot] Volume "+
4897-
"provision and snapshot creation/restore on VVOL Datastore", ginkgo.Label(p0, block, vanilla, snapshot,
4898-
tkg, vc80), func() {
4898+
ginkgo.It("[pq-wcp-snpt][block-vanilla-snapshot][tkg-snapshot][supervisor-snapshot]"+
4899+
"[ef-vks-snapshot-f] Volume provision and snapshot creation/restore on VVOL "+
4900+
"Datastore", ginkgo.Label(p0, block, vanilla, snapshot, tkg, vc80), func() {
48994901
ctx, cancel := context.WithCancel(context.Background())
49004902
defer cancel()
49014903
invokeSnapshotOperationsOnSharedDatastore(client, ctx, namespace, scParameters, snapc, "VVOL",
@@ -4910,9 +4912,9 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
49104912
3. Cleanup of snapshot, pvc and sc
49114913
*/
49124914

4913-
ginkgo.It("[ef-vanilla-block][pq-wcp-snpt][block-vanilla-snapshot][tkg-snapshot] [supervisor-snapshot]"+
4914-
"[ef-vks-snapshot] Volume provision and snapshot creation/restore on VMFS Datastore", ginkgo.Label(p0,
4915-
block, vanilla, snapshot, tkg, vc80), func() {
4915+
ginkgo.It("[ef-vanilla-block][pq-wcp-snpt][block-vanilla-snapshot][tkg-snapshot]"+
4916+
"[supervisor-snapshot][ef-vks-snapshot-f] Volume provision and snapshot creation/restore "+
4917+
"on VMFS Datastore", ginkgo.Label(p0, block, vanilla, snapshot, tkg, vc80), func() {
49164918
ctx, cancel := context.WithCancel(context.Background())
49174919
defer cancel()
49184920
invokeSnapshotOperationsOnSharedDatastore(client, ctx, namespace, scParameters, snapc, "VMFS", pandoraSyncWaitTime)
@@ -4925,8 +4927,8 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
49254927
3. Cleanup of snapshot, pvc and sc
49264928
*/
49274929
ginkgo.It("[ef-vanilla-block][ef-wcp-snapshot][block-vanilla-snapshot][tkg-snapshot] [supervisor-snapshot]"+
4928-
"[ef-vks-snapshot] Volume provision and snapshot creation/restore on NFS Datastore", ginkgo.Label(p0,
4929-
block, vanilla, snapshot, tkg, vc80), func() {
4930+
"[ef-vks-snapshot-f] Volume provision and snapshot creation/restore on "+
4931+
"NFS Datastore", ginkgo.Label(p0, block, vanilla, snapshot, tkg, vc80), func() {
49304932
ctx, cancel := context.WithCancel(context.Background())
49314933
defer cancel()
49324934
invokeSnapshotOperationsOnSharedDatastore(client, ctx, namespace, scParameters, snapc, "NFS", pandoraSyncWaitTime)
@@ -4938,8 +4940,9 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
49384940
2. Create Snapshot class and take a snapshot of the volume
49394941
3. Cleanup of snapshot, pvc and sc
49404942
*/
4941-
ginkgo.It("[pq-wcp-snpt] [tkg-snapshot][ef-vks-snapshot][supervisor-snapshot] Volume provision and snapshot "+
4942-
"creation/restore on VSAN2 Datastore", ginkgo.Label(p0, snapshot, tkg, newTest, vc80), func() {
4943+
ginkgo.It("[pq-wcp-snpt] [tkg-snapshot][ef-vks-snapshot-f][supervisor-snapshot] Volume provision and "+
4944+
"snapshot creation/restore on VSAN2 Datastore", ginkgo.Label(p0, snapshot, tkg,
4945+
newTest, vc80), func() {
49434946
ctx, cancel := context.WithCancel(context.Background())
49444947
defer cancel()
49454948
invokeSnapshotOperationsOnSharedDatastore(client, ctx, namespace, scParameters, snapc, "VSAN", pandoraSyncWaitTime)
@@ -5224,8 +5227,8 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
52245227
10. Run cleanup: Delete snapshots, restored-volumes, pods
52255228
*/
52265229

5227-
ginkgo.It("[tkg-snapshot][ef-vks-snapshot] Volume restore using dynamic and pre-provisioned snapshot on "+
5228-
"guest cluster", ginkgo.Label(p0, snapshot, tkg, flaky, vc80), func() {
5230+
ginkgo.It("[tkg-snapshot][ef-vks-snapshot-f] Volume restore using dynamic and pre-provisioned "+
5231+
"snapshot on guest cluster", ginkgo.Label(p0, snapshot, tkg, flaky, vc80), func() {
52295232

52305233
ctx, cancel := context.WithCancel(context.Background())
52315234
defer cancel()
@@ -5622,7 +5625,8 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
56225625
staticSnapshotContent.Name, metav1.GetOptions{})
56235626
gomega.Expect(err).NotTo(gomega.HaveOccurred())
56245627
framework.Logf("Snapshotcontent name is %s", staticSnapshotContent.ObjectMeta.Name)
5625-
if !*staticSnapshotContent.Status.ReadyToUse {
5628+
staticSnapshotContent, err = waitForVolumeSnapshotContentReadyToUse(*snapc, ctx, staticSnapshotContent.Name)
5629+
if err != nil && !*staticSnapshotContent.Status.ReadyToUse {
56265630
framework.Logf("VolumeSnapshotContent is not ready to use")
56275631
}
56285632

@@ -5762,7 +5766,7 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
57625766
_, err := e2eVSphere.getVMByUUID(ctx, vmUUID)
57635767
gomega.Expect(err).NotTo(gomega.HaveOccurred())
57645768
}
5765-
isDiskAttached, err := e2eVSphere.isVolumeAttachedToVM(client, pvs[0].Spec.CSI.VolumeHandle, vmUUID)
5769+
isDiskAttached, err := e2eVSphere.isVolumeAttachedToVM(client, volHandle, vmUUID)
57665770
gomega.Expect(err).NotTo(gomega.HaveOccurred())
57675771
gomega.Expect(isDiskAttached).To(gomega.BeTrue(), "Volume is not attached to the node")
57685772

@@ -6317,7 +6321,7 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
63176321
err = fpv.WaitForPersistentVolumeClaimPhase(ctx, v1.ClaimBound,
63186322
client, pvclaim.Namespace, pvclaim.Name, framework.Poll, framework.ClaimProvisionTimeout)
63196323
gomega.Expect(err).To(gomega.HaveOccurred())
6320-
expectedErrMsg := "no datastores found to create file volume, vsan file service may be disabled"
6324+
expectedErrMsg := "file services are disabled on supervisor cluster"
63216325
err = waitForEvent(ctx, client, namespace, expectedErrMsg, pvclaim.Name)
63226326
gomega.Expect(err).NotTo(gomega.HaveOccurred(), fmt.Sprintf("Expected error : %q", expectedErrMsg))
63236327
})
@@ -6394,7 +6398,7 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
63946398
_, err := e2eVSphere.getVMByUUID(ctx, vmUUID)
63956399
gomega.Expect(err).NotTo(gomega.HaveOccurred())
63966400
}
6397-
isDiskAttached, err := e2eVSphere.isVolumeAttachedToVM(client, pvs1[0].Spec.CSI.VolumeHandle, vmUUID)
6401+
isDiskAttached, err := e2eVSphere.isVolumeAttachedToVM(client, volHandle1, vmUUID)
63986402
gomega.Expect(err).NotTo(gomega.HaveOccurred())
63996403
gomega.Expect(isDiskAttached).To(gomega.BeTrue(), "Volume is not attached to the node")
64006404

@@ -6563,7 +6567,7 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
65636567
gomega.Expect(err).NotTo(gomega.HaveOccurred())
65646568
}
65656569

6566-
isDiskAttached, err := e2eVSphere.isVolumeAttachedToVM(client, pvs[0].Spec.CSI.VolumeHandle, vmUUID)
6570+
isDiskAttached, err := e2eVSphere.isVolumeAttachedToVM(client, volHandle, vmUUID)
65676571
gomega.Expect(err).NotTo(gomega.HaveOccurred())
65686572
gomega.Expect(isDiskAttached).To(gomega.BeTrue(), "Volume is not attached to the node")
65696573
defer func() {
@@ -6643,8 +6647,8 @@ var _ = ginkgo.Describe("Volume Snapshot Basic Test", func() {
66436647
9. Delete all the above created PV, PVC and resource quota.
66446648
*/
66456649

6646-
ginkgo.It("[tkg-snapshot][ef-vks-snapshot] Provisioning of static volume on guest cluster using FCD with snapshot "+
6647-
"creation", ginkgo.Label(p0, snapshot, tkg, stable, vc90), func() {
6650+
ginkgo.It("[tkg-snapshot][ef-vks-snapshot-f] Provisioning of static volume on guest cluster using "+
6651+
"FCD with snapshot creation", ginkgo.Label(p0, snapshot, tkg, stable, vc90), func() {
66486652

66496653
var err error
66506654
ctx, cancel := context.WithCancel(context.Background())

tests/e2e/gc_block_resize_retain_policy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ var _ = ginkgo.Describe("[csi-guest][ef-vks] [ef-vks-n1][ef-vks-n2] Volume Expan
414414
// 16. delete SC created in step 1 and step 7.
415415
// 17. delete GC2.
416416
// Steps 6 and 17 need to run manually before and after this suite.
417-
ginkgo.It("PV with reclaim policy retain can be resized when used in a fresh GC", ginkgo.Label(p0,
417+
ginkgo.It("[ef-vks-f] PV with reclaim policy retain can be resized when used in a fresh GC", ginkgo.Label(p0,
418418
block, tkg, vc70), func() {
419419
ctx, cancel := context.WithCancel(context.Background())
420420
defer cancel()
@@ -837,7 +837,7 @@ var _ = ginkgo.Describe("[csi-guest][ef-vks] [ef-vks-n1][ef-vks-n2] Volume Expan
837837
// 16. delete SC created in step 1 and step 7.
838838
// 17. delete GC1.
839839

840-
ginkgo.It("online volume expansion-PV with reclaim policy retain can be "+
840+
ginkgo.It("[ef-vks-f] online volume expansion-PV with reclaim policy retain can be "+
841841
"resized when used in a fresh GC", ginkgo.Label(p0, block, tkg, vc70), func() {
842842
var err error
843843
ctx, cancel := context.WithCancel(context.Background())

tests/e2e/gc_block_volume_expansion.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,8 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
631631
// 6. Verify size of PVs in SVC and GC are 5Gi.
632632
// 7. delete the PVC created in step 2.
633633
// 8. delete SC created in step 1.
634-
ginkgo.It("[ef-vks][ef-vks-n1][ef-vks-n2] Verify pvc expanded concurrently with different sizes "+
635-
"expands to largest size", ginkgo.Label(p0, block, tkg, vc70), func() {
634+
ginkgo.It("[ef-vks-f][ef-vks-n1-f][ef-vks-n2-f] Verify pvc expanded concurrently with "+
635+
"different sizes expands to largest size", ginkgo.Label(p0, block, tkg, vc70), func() {
636636
ctx, cancel := context.WithCancel(context.Background())
637637
defer cancel()
638638
ginkgo.By("Expanding current pvc")
@@ -1586,8 +1586,8 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
15861586

15871587
_ = e2ekubectl.RunKubectlOrDie(namespace, cmdTestData...)
15881588
} else {
1589-
_ = e2ekubectl.RunKubectlOrDie(namespace, "cp", testdataFile,
1590-
fmt.Sprintf("%v/%v:/mnt/volume1/testdata", namespace, pod.Name))
1589+
_ = e2ekubectl.RunKubectlOrDie(namespace, "cp",
1590+
fmt.Sprintf("%v/%v:/mnt/volume1/testdata", namespace, pod.Name), testdataFile+"_pod")
15911591
}
15921592

15931593
onlineVolumeResizeCheck(f, client, namespace, svcPVCName, volHandle, pvclaim, pod)
@@ -1663,8 +1663,8 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
16631663
// 4. Check using CNS query that size of the volume is 10Gi.
16641664
// 5. Verify size of PVs in SVC and GC are 10Gi.
16651665
// 6. delete the PVC, pod and SC.
1666-
ginkgo.It("[ef-vks][ef-vks-n1][ef-vks-n2]Verify online volume resize on pvc expanded concurrently with different "+
1667-
"sizes", ginkgo.Label(p1, block, tkg, vc70), func() {
1666+
ginkgo.It("[ef-vks-f][ef-vks-n1-f][ef-vks-n2-f]Verify online volume resize on pvc expanded concurrently "+
1667+
"with different sizes", ginkgo.Label(p1, block, tkg, vc70), func() {
16681668
ctx, cancel := context.WithCancel(context.Background())
16691669
defer cancel()
16701670

@@ -1901,8 +1901,8 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
19011901
// 9. Trigger online volume expansion on gc-pvc and make sure volume
19021902
// expansion is successful.
19031903
// 10. Delete all the above created PV, PVC and resource quota.
1904-
ginkgo.It("[ef-vks][ef-vks-n1][ef-vks-n2] Online volume resize on statically created PVC on guest "+
1905-
"cluster svcPVC=gcPVC", ginkgo.Label(p1, block, tkg, vc70), func() {
1904+
ginkgo.It("[ef-vks-f][ef-vks-n1-f][ef-vks-n2-f] Online volume resize on statically created PVC "+
1905+
"on guest cluster svcPVC=gcPVC", ginkgo.Label(p1, block, tkg, vc70), func() {
19061906
var err error
19071907
ctx, cancel := context.WithCancel(context.Background())
19081908
defer cancel()

tests/e2e/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4027,7 +4027,7 @@ func waitForCNSRegisterVolumeToGetCreated(ctx context.Context, restConfig *rest.
40274027
}
40284028
}
40294029

4030-
describeCNSRegisterVolume(ctx, namespace, cnsRegisterVolumeName)
4030+
describeCNSRegisterVolume(ctx, svcNamespace, cnsRegisterVolumeName)
40314031

40324032
return fmt.Errorf("cnsRegisterVolume %s creation is failed within %v", cnsRegisterVolumeName, timeout)
40334033
}

tests/e2e/vsphere_volume_expansion.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ var _ = ginkgo.Describe("Volume Expansion Test", func() {
278278
// 10. Delete PVC, PV and Storage Class.
279279

280280
ginkgo.It("[ef-vanilla-block][ef-wcp][csi-block-vanilla][csi-guest][csi-supervisor]"+
281-
"[csi-block-vanilla-parallelized][csi-vcp-mig][ef-vks][ef-vks-n1][ef-vks-n2] Verify volume expansion "+
281+
"[csi-block-vanilla-parallelized][csi-vcp-mig][ef-vks-f]"+
282+
"[ef-vks-n1-f][ef-vks-n2-f] Verify volume expansion "+
282283
"can happen multiple times", ginkgo.Label(p1, block, vanilla, wcp, core, vc70), func() {
283284
invokeTestForExpandVolumeMultipleTimes(f, client, namespace, "", storagePolicyName, profileID)
284285
})

0 commit comments

Comments
 (0)