Skip to content

Commit

Permalink
ci: increase pvc count
Browse files Browse the repository at this point in the history
increase the pvc count

Signed-off-by: Madhu Rajanna <[email protected]>
  • Loading branch information
Madhu-1 committed Dec 2, 2024
1 parent 3f6dacb commit 438f3ab
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 42 deletions.
21 changes: 1 addition & 20 deletions e2e/cephfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,31 +355,12 @@ var _ = Describe(cephfsType, func() {
framework.Failf("failed to create CephFS storageclass: %v", err)
}
scName := "csi-cephfs-sc"
snapshotter, err := newCephFSVolumeGroupSnapshot(f, f.UniqueName, scName, false, deployTimeout, 10)
snapshotter, err := newCephFSVolumeGroupSnapshot(f, f.UniqueName, scName, false, deployTimeout, 20)
if err != nil {
framework.Failf("failed to create volumeGroupSnapshot Base: %v", err)
}

snapTestErr := snapshotter.TestVolumeGroupSnapshot()
err = retryKubectlInput(f.UniqueName, kubectlGet, "volumegroupsnapshot", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumegroupsnapshot: %v", err)
}

err = retryKubectlInput(f.UniqueName, kubectlGet, "volumegroupsnapshotcontent", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumegroupsnapshot: %v", err)
}

err = retryKubectlInput(f.UniqueName, kubectlGet, "volumesnapshot", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumesnapshot: %v", err)
}

err = retryKubectlInput(f.UniqueName, kubectlGet, "volumesnapshotcontent", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumesnapshotcontent: %v", err)
}

if snapTestErr != nil {
framework.Failf("failed to test volumeGroupSnapshot: %v", snapTestErr)
Expand Down
22 changes: 1 addition & 21 deletions e2e/rbd.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,32 +560,12 @@ var _ = Describe("RBD", func() {
}

scName := "csi-rbd-sc"
snapshotter, err := newRBDVolumeGroupSnapshot(f, f.UniqueName, scName, false, deployTimeout, 10)
snapshotter, err := newRBDVolumeGroupSnapshot(f, f.UniqueName, scName, false, deployTimeout, 20)
if err != nil {
framework.Failf("failed to create RBDVolumeGroupSnapshot: %v", err)
}

snapTestErr := snapshotter.TestVolumeGroupSnapshot()
err = retryKubectlInput(f.UniqueName, kubectlGet, "volumegroupsnapshot", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumegroupsnapshot: %v", err)
}

err = retryKubectlInput(f.UniqueName, kubectlGet, "volumegroupsnapshotcontent", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumegroupsnapshot: %v", err)
}

err = retryKubectlInput(f.UniqueName, kubectlGet, "volumesnapshot", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumesnapshot: %v", err)
}

err = retryKubectlInput(f.UniqueName, kubectlGet, "volumesnapshotcontent", deployTimeout, "-oyaml")
if err != nil {
framework.Logf("failed to get volumesnapshotcontent: %v", err)
}

if snapTestErr != nil {
framework.Failf("failed to test volumeGroupSnapshot: %v", snapTestErr)
}
Expand Down
34 changes: 33 additions & 1 deletion e2e/volumegroupsnapshot_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ func (v volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshotClass(groupSnapshot
}

func (v *volumeGroupSnapshotterBase) testVolumeGroupSnapshot(vol VolumeGroupSnapshotter) error {
for i := 0; i < 15; i++ {
for i := 0; i < 10; i++ {
pvcLabels := map[string]string{"pvc": "vgsc"}
pvcs, err := v.CreatePVCs(v.namespace, pvcLabels)
if err != nil {
Expand Down Expand Up @@ -522,6 +522,38 @@ func (v *volumeGroupSnapshotterBase) testVolumeGroupSnapshot(vol VolumeGroupSnap
if err != nil {
return fmt.Errorf("failed to delete volume group snapshot class: %w", err)
}

vgscNew, err := v.groupclient.VolumeGroupSnapshotContents().List(context.TODO(), metav1.ListOptions{})
if err != nil {
return fmt.Errorf("failed to list VolumeGroupSnapshotContent: %w", err)
}
for _, vgsc := range vgscNew.Items {
framework.Logf("VolumeGroupSnapshotContent %s is not deleted %+v", vgsc.Name, vgsc)
}
vgsNew, err := v.groupclient.VolumeGroupSnapshots(v.namespace).List(context.TODO(), metav1.ListOptions{})
if err != nil {
return fmt.Errorf("failed to list VolumeGroupSnapshot: %w", err)
}
for _, vgs := range vgsNew.Items {
framework.Logf("VolumeGroupSnapshot %s is not deleted %+v", vgs.Name, vgs)
}
vsNew, err := v.snapClient.VolumeSnapshots(v.namespace).List(context.TODO(), metav1.ListOptions{})
if err != nil {
return fmt.Errorf("failed to list VolumeSnapshot: %w", err)
}
for _, vs := range vsNew.Items {
framework.Logf("VolumeSnapshot %s is not deleted %+v", vs.Name, vs)
}

vscNew, err := v.snapClient.VolumeSnapshotContents().List(context.TODO(), metav1.ListOptions{})
if err != nil {
return fmt.Errorf("failed to list VolumeSnapshotContent: %w", err)
}
for _, vsc := range vscNew.Items {
framework.Logf("VolumeSnapshotContent %s is not deleted %+v", vsc.Name, vsc)
}
framework.Logf("VolumeGroupSnapshot test %d completed", i)

}
return nil
}

0 comments on commit 438f3ab

Please sign in to comment.