Skip to content

Commit e3e9ccb

Browse files
authored
Merge branch 'main' into testCustomCliDownload
2 parents 76ecca2 + 6a45414 commit e3e9ccb

20 files changed

Lines changed: 597 additions & 395 deletions

libs/infra/images.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Cirros:
1717
DIR: str = f"{BASE_IMAGES_DIR}/cirros-images"
1818
DEFAULT_DV_SIZE: str = "1Gi"
1919
DEFAULT_MEMORY_SIZE: str = "64M"
20+
OS_FLAVOR: str = "cirros"
2021

2122

2223
@dataclass

tests/conftest.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -460,11 +460,21 @@ def cnv_tests_utilities_namespace(admin_client, installing_cnv):
460460
if installing_cnv:
461461
yield
462462
else:
463-
yield from create_ns(
464-
admin_client=admin_client,
465-
labels=POD_SECURITY_NAMESPACE_LABELS,
466-
name="cnv-tests-utilities",
467-
)
463+
name = "cnv-tests-utilities"
464+
if Namespace(client=admin_client, name=name).exists:
465+
exit_pytest_execution(
466+
message=f"{name} namespace already exists."
467+
f"\nAfter verifying no one else is performing tests against the cluster, run:"
468+
f"\n'oc delete namespace {name}'",
469+
return_code=100,
470+
)
471+
472+
else:
473+
yield from create_ns(
474+
admin_client=admin_client,
475+
labels=POD_SECURITY_NAMESPACE_LABELS,
476+
name=name,
477+
)
468478

469479

470480
@pytest.fixture(scope="session")

tests/global_config_s390x.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@
1111

1212
global config
1313

14-
# TODO: remove once CIRROS is replaced
15-
utilities.constants.OS_FLAVOR_CIRROS = "fedora"
14+
1615
EXPECTED_CLUSTER_INSTANCE_TYPE_LABELS[PREFERENCE_STR] = f"rhel.9.{S390X}"
1716

18-
rhel_os_matrix = generate_os_matrix_dict(os_name="rhel", supported_operating_systems=["rhel-9-5"])
19-
fedora_os_matrix = generate_os_matrix_dict(os_name="fedora", supported_operating_systems=["fedora-41"])
17+
rhel_os_matrix = generate_os_matrix_dict(
18+
os_name="rhel",
19+
supported_operating_systems=[
20+
"rhel-8-10",
21+
"rhel-9-6",
22+
],
23+
)
24+
fedora_os_matrix = generate_os_matrix_dict(os_name="fedora", supported_operating_systems=["fedora-42"])
2025
centos_os_matrix = generate_os_matrix_dict(os_name="centos", supported_operating_systems=["centos-stream-9"])
2126

2227
instance_type_rhel_os_matrix = generate_linux_instance_type_os_matrix(

tests/network/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def _verify_bgp_env_vars():
326326
EXTERNAL_FRR_STATIC_IPV4: reserved IP in CIDR format for the external FRR pod inside
327327
PRIMARY_NODE_NETWORK_VLAN_TAG network.
328328
"""
329-
if any(test.get_closest_marker("bgp") for test in collected_tests):
329+
if any(test.get_closest_marker("bgp") and not test.get_closest_marker("xfail") for test in collected_tests):
330330
LOGGER.info("Verifying if the cluster supports running BGP tests...")
331331
required_env_vars = [
332332
"PRIMARY_NODE_NETWORK_VLAN_TAG",

tests/network/l2_bridge/test_l2_ovs_linux_bridge.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from timeout_sampler import TimeoutSampler
88

99
from tests.network.libs.dhcpd import DHCP_IP_RANGE_START
10-
from utilities.constants import TIMEOUT_2MIN
10+
from utilities.constants import QUARANTINED, TIMEOUT_2MIN
1111
from utilities.network import assert_ping_successful, get_vmi_ip_v4_by_name, ping
1212

1313
LOGGER = logging.getLogger(__name__)
@@ -73,10 +73,13 @@ def test_dhcp_broadcast(
7373
l2_bridge_running_vm_b,
7474
configured_l2_bridge_vm_a,
7575
started_vmb_dhcp_client,
76+
request,
7677
):
7778
"""
7879
Test broadcast traffic via L2 linux bridge. VM_A has dhcp server installed. VM_B dhcp client.
7980
"""
81+
if "ovs-bridge" in request.node.name:
82+
pytest.xfail(reason=f"{QUARANTINED}: Test is flaky over OVS bridge, tracked in CNV-70028")
8083
current_ip = TimeoutSampler(
8184
wait_timeout=TIMEOUT_2MIN,
8285
sleep=2,

tests/storage/cdi_clone/test_clone.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
create_windows_vm_validate_guest_agent_info,
1414
)
1515
from utilities.constants import (
16-
OS_FLAVOR_CIRROS,
1716
OS_FLAVOR_FEDORA,
1817
OS_FLAVOR_WINDOWS,
1918
TIMEOUT_1MIN,
@@ -48,7 +47,7 @@ def create_vm_from_clone_dv_template(
4847
with VirtualMachineForTests(
4948
name=vm_name,
5049
namespace=namespace_name,
51-
os_flavor=OS_FLAVOR_CIRROS,
50+
os_flavor=Images.Cirros.OS_FLAVOR,
5251
client=client,
5352
memory_guest=Images.Cirros.DEFAULT_MEMORY_SIZE,
5453
data_volume_template=data_volume_template_dict(

tests/storage/cdi_upload/test_upload.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from tests.os_params import RHEL_LATEST
2525
from utilities.constants import (
2626
CDI_UPLOADPROXY,
27+
QUARANTINED,
2728
TIMEOUT_1MIN,
2829
TIMEOUT_3MIN,
2930
TIMEOUT_5MIN,
@@ -181,6 +182,10 @@ def test_successful_upload_with_supported_formats(
181182
check_disk_count_in_vm(vm=vm_dv)
182183

183184

185+
@pytest.mark.xfail(
186+
reason=f"{QUARANTINED}: Flaky test, timeout failure; CNV-67422",
187+
run=False,
188+
)
184189
@pytest.mark.parametrize(
185190
"data_volume_multi_storage_scope_function",
186191
[

tests/storage/cdi_upload/test_upload_virtctl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
assert_use_populator,
2020
create_vm_and_verify_image_permission,
2121
)
22-
from utilities.constants import CDI_UPLOADPROXY, OS_FLAVOR_CIRROS, TIMEOUT_1MIN, Images
22+
from utilities.constants import CDI_UPLOADPROXY, TIMEOUT_1MIN, Images
2323
from utilities.storage import (
2424
ErrorMsg,
2525
check_disk_count_in_vm,
@@ -335,7 +335,7 @@ def test_virtctl_image_upload_with_exist_pvc(
335335
with VirtualMachineForTests(
336336
name="cnv-3727-vm",
337337
namespace=empty_pvc.namespace,
338-
os_flavor=OS_FLAVOR_CIRROS,
338+
os_flavor=Images.Cirros.OS_FLAVOR,
339339
memory_guest=Images.Cirros.DEFAULT_MEMORY_SIZE,
340340
pvc=empty_pvc,
341341
) as vm:

tests/storage/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
CDI_UPLOADPROXY,
4444
CNV_TEST_SERVICE_ACCOUNT,
4545
CNV_TESTS_CONTAINER,
46-
OS_FLAVOR_CIRROS,
4746
SECURITY_CONTEXT,
4847
TIMEOUT_1MIN,
4948
TIMEOUT_5SEC,
@@ -499,7 +498,7 @@ def cirros_vm_for_snapshot(
499498
client=admin_client,
500499
name=cirros_vm_name,
501500
namespace=dv_metadata["namespace"],
502-
os_flavor=OS_FLAVOR_CIRROS,
501+
os_flavor=Images.Cirros.OS_FLAVOR,
503502
memory_guest=Images.Cirros.DEFAULT_MEMORY_SIZE,
504503
data_volume_template={
505504
"metadata": dv_metadata,

tests/storage/restricted_namespace_cloning/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
create_role_binding,
3131
set_permissions,
3232
)
33-
from utilities.constants import OS_FLAVOR_CIRROS, PVC, UNPRIVILEGED_USER, Images
33+
from utilities.constants import PVC, UNPRIVILEGED_USER, Images
3434
from utilities.infra import create_ns
3535
from utilities.storage import create_dv
3636
from utilities.virt import VirtualMachineForTests, running_vm
@@ -279,7 +279,7 @@ def vm_for_restricted_namespace_cloning_test(
279279
with VirtualMachineForTests(
280280
name=VM_FOR_TEST,
281281
namespace=destination_namespace.name,
282-
os_flavor=OS_FLAVOR_CIRROS,
282+
os_flavor=Images.Cirros.OS_FLAVOR,
283283
service_accounts=[restricted_namespace_service_account.name],
284284
client=unprivileged_client,
285285
memory_guest=Images.Cirros.DEFAULT_MEMORY_SIZE,

0 commit comments

Comments
 (0)