ceph-csi
ceph-csi copied to clipboard
e2e: validate snapshot count after their creation
Describe the bug
As a good practice, always make sure to validate the snapshot count after we create them in the tests Something like:
err = createSnapshot(&snap, deployTimeout)
if err != nil {
e2elog.Failf("failed to create snapshot (%s): %v", snap.Name, err)
}
snaps, err := listCephFSSnapshots(f, fileSystemName, subvolumes[0].Name, subvolumegroup)
if err != nil {
e2elog.Failf("failed to list subvolume snapshots: %v", err)
}
if len(snaps) == 0 {
e2elog.Failf("cephFS snapshots list is empty %s/%s", fileSystemName, subvolumes[0].Name)
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.