Skip to content

Commit 1fc0605

Browse files
committed
adjust pvc size to match minimumSupportedPvcSize in T2
1 parent 18a6475 commit 1fc0605

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/storage/cdi_upload/test_upload_virtctl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,15 @@ def empty_pvc(
275275
storage_class_matrix__module__,
276276
storage_class_name_scope_module,
277277
worker_node1,
278+
storage_profile_minimum_supported_pvc_size,
278279
):
279280
with PersistentVolumeClaim(
280281
name="empty-pvc",
281282
namespace=namespace.name,
282283
storage_class=storage_class_name_scope_module,
283284
volume_mode=storage_class_matrix__module__[storage_class_name_scope_module]["volume_mode"],
284285
accessmodes=storage_class_matrix__module__[storage_class_name_scope_module]["access_mode"],
285-
size=DEFAULT_DV_SIZE,
286+
size=storage_profile_minimum_supported_pvc_size,
286287
hostpath_node=worker_node1.name
287288
if sc_is_hpp_with_immediate_volume_binding(sc=storage_class_name_scope_module)
288289
else None,

tests/storage/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ocp_resources.route import Route
2222
from ocp_resources.secret import Secret
2323
from ocp_resources.storage_class import StorageClass
24+
from ocp_resources.storage_profile import StorageProfile
2425
from ocp_resources.virtual_machine_cluster_instancetype import (
2526
VirtualMachineClusterInstancetype,
2627
)
@@ -585,3 +586,9 @@ def rhel10_data_source_scope_module(golden_images_namespace):
585586
client=golden_images_namespace.client,
586587
ensure_exists=True,
587588
)
589+
590+
591+
@pytest.fixture(scope="function")
592+
def storage_profile_minimum_supported_pvc_size(storage_class_matrix__function__):
593+
storage_profile = StorageProfile(name=[*storage_class_matrix__function__][0])
594+
return storage_profile.instance.metadata.annotations.get("cdi.kubevirt.io/minimumSupportedPvcSize", "1Gi")

0 commit comments

Comments
 (0)