Skip to content

Commit e50bb24

Browse files
[Storage] In TestDataImportCronPvcSource use Fedora image from quay (#3810)
##### Short description: Use the Fedora image from quay registry for TestDataImportCronPvcSource. ##### More details: https://issues.redhat.com/browse/CNV-79293 ##### What this PR does / why we need it: Switching to registry is expected to be more reliable than Artifactory. ##### Which issue(s) this PR fixes: Improve TestDataImportCronPvcSource reliability. ##### Special notes for reviewer: It's my first PR in this repo! ##### jira-ticket: <!-- full-ticket-url needs to be provided. This would add a link to the pull request to the jira and close it when the pull request is merged If the task is not tracked by a Jira ticket, just write "NONE". --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Updated test fixtures to use Fedora-based container images and registry settings instead of RHEL. * Aligned data source and VM configurations with Fedora defaults (including image source and sizing) to ensure consistent data import test behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent ee5eed1 commit e50bb24

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/storage/data_import_cron/conftest.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
from ocp_resources.data_source import DataSource
77
from ocp_resources.resource import Resource
88

9+
from tests.storage.constants import QUAY_FEDORA_CONTAINER_IMAGE
910
from tests.storage.utils import create_role_binding
10-
from utilities.constants import BIND_IMMEDIATE_ANNOTATION, OS_FLAVOR_RHEL, TIMEOUT_10MIN, Images
11+
from utilities.constants import BIND_IMMEDIATE_ANNOTATION, OS_FLAVOR_FEDORA, REGISTRY_STR, TIMEOUT_10MIN, Images
1112
from utilities.infra import create_ns
1213
from utilities.storage import create_dv, data_volume_template_with_source_ref_dict
1314
from utilities.virt import VirtualMachineForTests, running_vm
@@ -21,14 +22,13 @@ def data_import_cron_pvc_target_namespace(admin_client, unprivileged_client):
2122

2223

2324
@pytest.fixture(scope="class")
24-
def dv_source_for_data_import_cron(
25-
namespace, storage_class_name_scope_module, rhel9_http_image_url, unprivileged_client
26-
):
25+
def dv_source_for_data_import_cron(namespace, storage_class_name_scope_module, unprivileged_client):
2726
with create_dv(
28-
dv_name="dv-source-rhel",
27+
dv_name="dv-source-fedora",
2928
namespace=namespace.name,
30-
url=rhel9_http_image_url,
31-
size=Images.Rhel.DEFAULT_DV_SIZE,
29+
source=REGISTRY_STR,
30+
url=QUAY_FEDORA_CONTAINER_IMAGE,
31+
size=Images.Fedora.DEFAULT_DV_SIZE,
3232
storage_class=storage_class_name_scope_module,
3333
client=unprivileged_client,
3434
) as dv:
@@ -43,14 +43,14 @@ def vm_for_data_source_import(
4343
name="vm-with-imported-data-source",
4444
namespace=data_import_cron_pvc_target_namespace.name,
4545
client=unprivileged_client,
46-
os_flavor=OS_FLAVOR_RHEL,
46+
os_flavor=OS_FLAVOR_FEDORA,
4747
data_volume_template=data_volume_template_with_source_ref_dict(
4848
data_source=DataSource(
4949
name=imported_data_source.name, namespace=data_import_cron_pvc_target_namespace.name
5050
),
5151
storage_class=storage_class_name_scope_module,
5252
),
53-
memory_guest=Images.Rhel.DEFAULT_MEMORY_SIZE,
53+
memory_guest=Images.Fedora.DEFAULT_MEMORY_SIZE,
5454
) as vm:
5555
running_vm(vm=vm)
5656
yield vm

0 commit comments

Comments
 (0)