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 Dec 3, 2024
1 parent 721e94a commit 2d50c02
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 2d50c02

Please sign in to comment.