Skip to content

Commit

Permalink
e2e: test creation of additional groupSnaps to test minSnapLimit
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshith R <[email protected]>
  • Loading branch information
Rakshith-R committed Nov 22, 2024
1 parent 082825d commit 1dc490e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions e2e/volumegroupsnapshot_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,22 @@ func (v *volumeGroupSnapshotterBase) testVolumeGroupSnapshot(vol VolumeGroupSnap
return fmt.Errorf("failed to create volume group snapshot: %w", err)
}

// Create and delete 5 additional group snapshots to test flattening on minSnapshotLimit
for i := range 5 {
newVGSName := fmt.Sprintf("%s-%d", vgsName, i)
_, err = v.CreateVolumeGroupSnapshot(newVGSName, vgscName, pvcLabels)
if err != nil {
return fmt.Errorf("failed to create volume group snapshot %q: %w", newVGSName, err)
}
}
for i := range 5 {
newVGSName := fmt.Sprintf("%s-%d", vgsName, i)
err = v.DeleteVolumeGroupSnapshot(newVGSName)
if err != nil {
return fmt.Errorf("failed to delete volume group snapshot %q: %w", newVGSName, err)
}
}

clonePVCs, err := v.CreatePVCClones(volumeGroupSnapshot)
if err != nil {
return fmt.Errorf("failed to create clones: %w", err)
Expand Down

0 comments on commit 1dc490e

Please sign in to comment.