fix: Use appropriate function for block dv in the test
@@ -2177,20 +2177,13 @@ var _ = Describe("[Serial][rfe_id:393][crit:high][vendor:cnv-qe@redhat.com][leve
if !tests.HasCDI() {
Skip("Skip DataVolume tests when CDI is not present")
}
- sc, exists := tests.GetRWXBlockStorageClass()
- if !exists {
- Skip("Skip migration test when RWX block storage is not present")
- }
quantity, err := resource.ParseQuantity("5Gi")
Expect(err).ToNot(HaveOccurred())
- volMode := k8sv1.PersistentVolumeBlock
url := "docker://" + cd.ContainerDiskFor(cd.ContainerDiskFedoraTestTooling)
- dv := tests.NewRandomDataVolumeWithRegistryImport(url, util.NamespaceTestDefault, k8sv1.ReadWriteMany)
- dv.Spec.PVC.StorageClassName = &sc
+ dv := tests.NewRandomBlockDataVolumeWithRegistryImport(url, util.NamespaceTestDefault, k8sv1.ReadWriteMany)
dv.Spec.PVC.Resources.Requests["storage"] = quantity
- dv.Spec.PVC.VolumeMode = &volMode
_, err = virtClient.CdiClient().CdiV1beta1().DataVolumes(dv.Namespace).Create(context.Background(), dv, metav1.CreateOptions{})
Expect(err).ToNot(HaveOccurred())
