Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/storage/cdi_import/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def dv_from_http_import(
content_type=request.param.get("content_type", DataVolume.ContentType.KUBEVIRT),
cert_configmap=request.param.get("configmap_name"),
size=request.param.get("size", DEFAULT_DV_SIZE),
volume_mode=request.param.get("volume_mode"),
Comment thread
jpeimer marked this conversation as resolved.
storage_class=storage_class_name_scope_module,
client=namespace.client,
) as dv:
Expand Down
9 changes: 2 additions & 7 deletions tests/storage/cdi_import/test_import_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test_successful_import_image(
"source": HTTPS,
"content_type": DataVolume.ContentType.ARCHIVE,
"configmap_name": INTERNAL_HTTP_CONFIGMAP_NAME,
"volume_mode": DataVolume.VolumeMode.FILE, # Archive type only supports Filesystem volume mode
},
marks=pytest.mark.polarion("CNV-2338"),
),
Expand All @@ -131,13 +132,7 @@ def test_successful_import_image(
)
@pytest.mark.sno
@pytest.mark.s390x
def test_successful_import_secure_archive(
skip_block_volumemode_scope_module, internal_http_configmap, running_pod_with_dv_pvc
):
"""
Skip block volume mode - archive does not support block mode DVs,
https://github.com/kubevirt/containerized-data-importer/blob/main/doc/supported_operations.md
"""
def test_successful_import_secure_archive(internal_http_configmap, running_pod_with_dv_pvc):
Comment thread
coderabbitai[bot] marked this conversation as resolved.
assert_num_files_in_pod(pod=running_pod_with_dv_pvc, expected_num_of_files=3)


Expand Down
11 changes: 0 additions & 11 deletions tests/storage/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,6 @@ def download_image():
get_downloaded_artifact(remote_name=f"{Images.Cdi.DIR}/{Images.Cdi.QCOW2_IMG}", local_name=LOCAL_PATH)


def _skip_block_volumemode(storage_class_matrix):
storage_class = [*storage_class_matrix][0]
if storage_class_matrix[storage_class]["volume_mode"] == "Block":
pytest.skip("Test is not supported on Block volume mode")


@pytest.fixture(scope="module")
def skip_block_volumemode_scope_module(storage_class_matrix__module__):
_skip_block_volumemode(storage_class_matrix=storage_class_matrix__module__)


@pytest.fixture()
def default_fs_overhead(cdi_config):
return float(cdi_config.instance.status.filesystemOverhead["global"])
Expand Down