e2e: add verification for encrypted Snapshot/Restore operations

This moves validatePVCSnapshot() into its own function, so that it
follows the same format as validatePVCClone() does already.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2021-04-08 17:46:11 +02:00
committed by mergify[bot]
parent 3fde636685
commit bb296c4f21
3 changed files with 321 additions and 243 deletions

View File

@ -136,6 +136,17 @@ func createRBDSnapshotClass(f *framework.Framework) error {
return err
}
func deleteRBDSnapshotClass() error {
scPath := fmt.Sprintf("%s/%s", rbdExamplePath, "snapshotclass.yaml")
sc := getSnapshotClass(scPath)
sclient, err := newSnapshotClient()
if err != nil {
return err
}
return sclient.SnapshotV1beta1().VolumeSnapshotClasses().Delete(context.TODO(), sc.Name, metav1.DeleteOptions{})
}
func createCephFSSnapshotClass(f *framework.Framework) error {
scPath := fmt.Sprintf("%s/%s", cephfsExamplePath, "snapshotclass.yaml")
sc := getSnapshotClass(scPath)