Use snapshot storage class from config in snapshot/restore tests
If the snapshot storage class was set in the config file
use it, if not check if exists other snapshot class available.
@@ -1070,6 +1070,11 @@ func getSnapshotStorageClass(client kubecli.KubevirtClient) (string, error) {
return "", nil
}
+ configuredStorageClass, exists := tests.GetSnapshotStorageClass()
+ if exists {
+ return configuredStorageClass, nil
+ }
+
volumeSnapshotClasses, err := client.KubernetesSnapshotClient().SnapshotV1beta1().VolumeSnapshotClasses().List(context.Background(), metav1.ListOptions{})
if err != nil {
return "", err
