From b5d822ed1dd21aa1d4561bd23470e93d941c308a Mon Sep 17 00:00:00 2001 From: Yossi Segev Date: Tue, 5 May 2026 17:19:05 +0300 Subject: [PATCH 1/2] net: Mark localnet tests Signed-off-by: Yossi Segev Assisted by: Claude Code Signed-off-by: --- pytest.ini | 1 + tests/network/localnet/ipam/test_connectivity.py | 2 ++ .../localnet/migration_stuntime/test_migration_stuntime.py | 2 ++ tests/network/localnet/test_default_bridge.py | 2 ++ tests/network/localnet/test_jumbo_frames.py | 1 + tests/network/localnet/test_ovs_bridge.py | 2 ++ 6 files changed, 10 insertions(+) diff --git a/pytest.ini b/pytest.ini index c19714291c..31b0ea997e 100644 --- a/pytest.ini +++ b/pytest.ini @@ -72,6 +72,7 @@ markers = rwx_default_storage: Tests that require RWX storage descheduler: Tests that require kube-descheduler on nodes remote_cluster: Tests that require a remote cluster + localnet: Tests that use node localnet topology ## Required operators mtv: Tests that require the MTV operator to be installed diff --git a/tests/network/localnet/ipam/test_connectivity.py b/tests/network/localnet/ipam/test_connectivity.py index b1c2c66b47..ba01d16c19 100644 --- a/tests/network/localnet/ipam/test_connectivity.py +++ b/tests/network/localnet/ipam/test_connectivity.py @@ -4,6 +4,8 @@ from libs.vm.vm import BaseVirtualMachine from tests.network.localnet.liblocalnet import LOCALNET_IPAM_INTERFACE +pytestmark = pytest.mark.localnet + @pytest.mark.ipv4 @pytest.mark.polarion("CNV-14043") diff --git a/tests/network/localnet/migration_stuntime/test_migration_stuntime.py b/tests/network/localnet/migration_stuntime/test_migration_stuntime.py index 9c0a6f0c9a..5b7327bd34 100644 --- a/tests/network/localnet/migration_stuntime/test_migration_stuntime.py +++ b/tests/network/localnet/migration_stuntime/test_migration_stuntime.py @@ -20,6 +20,8 @@ import pytest +pytestmark = pytest.mark.localnet + __test__ = False """ diff --git a/tests/network/localnet/test_default_bridge.py b/tests/network/localnet/test_default_bridge.py index 08ca3fef32..d5ce0f5db0 100644 --- a/tests/network/localnet/test_default_bridge.py +++ b/tests/network/localnet/test_default_bridge.py @@ -14,6 +14,8 @@ from utilities.constants import QUARANTINED from utilities.virt import migrate_vm_and_verify +pytestmark = pytest.mark.localnet + @pytest.mark.gating @pytest.mark.single_nic diff --git a/tests/network/localnet/test_jumbo_frames.py b/tests/network/localnet/test_jumbo_frames.py index ba7e7bcf39..111e0cd812 100644 --- a/tests/network/localnet/test_jumbo_frames.py +++ b/tests/network/localnet/test_jumbo_frames.py @@ -7,6 +7,7 @@ from utilities.virt import vm_console_run_commands pytestmark = [ + pytest.mark.localnet, pytest.mark.special_infra, pytest.mark.jumbo_frame, ] diff --git a/tests/network/localnet/test_ovs_bridge.py b/tests/network/localnet/test_ovs_bridge.py index 33bcc5c1d2..2a1b2d969a 100644 --- a/tests/network/localnet/test_ovs_bridge.py +++ b/tests/network/localnet/test_ovs_bridge.py @@ -13,6 +13,8 @@ ) from utilities.virt import migrate_vm_and_verify +pytestmark = pytest.mark.localnet + @pytest.mark.s390x @pytest.mark.usefixtures("nncp_localnet_on_secondary_node_nic") From 448446ce5d6e77ed6790da32d262ede67fe7e98a Mon Sep 17 00:00:00 2001 From: Yossi Segev Date: Wed, 6 May 2026 18:31:21 +0300 Subject: [PATCH 2/2] WIP: Adjust network tests for multi-arch regression Signed-off-by: Yossi Segev --- libs/vm/factory.py | 9 +++++++-- libs/vm/spec.py | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/vm/factory.py b/libs/vm/factory.py index b6111991b6..c6bf0d0537 100644 --- a/libs/vm/factory.py +++ b/libs/vm/factory.py @@ -1,10 +1,11 @@ from __future__ import annotations from kubernetes.dynamic import DynamicClient +from pytest_testconfig import config as py_config from libs.vm.spec import CPU, Devices, Domain, Memory, Metadata, Template, VMISpec, VMSpec from libs.vm.vm import BaseVirtualMachine, container_image, containerdisk_storage -from utilities.constants import OS_FLAVOR_FEDORA, Images +from utilities.constants import OS_FLAVOR_FEDORA def fedora_vm( @@ -29,7 +30,10 @@ def fedora_vm( def fedora_image() -> str: - return container_image(base_image=Images.Fedora.FEDORA_CONTAINER_IMAGE) + from utilities.constants import ArchImages + + arch_images = getattr(ArchImages, py_config["cpu_arch"].upper()) + return container_image(base_image=arch_images.Fedora.FEDORA_CONTAINER_IMAGE) def _fill_vm_spec_defaults(spec: VMSpec | None) -> VMSpec: @@ -37,6 +41,7 @@ def _fill_vm_spec_defaults(spec: VMSpec | None) -> VMSpec: vmi_spec = spec.template.spec + vmi_spec.architecture = vmi_spec.architecture or py_config["cpu_arch"] vmi_spec.domain.devices = vmi_spec.domain.devices or Devices(rng={}) vmi_spec.domain.devices.disks = vmi_spec.domain.devices.disks or [] vmi_spec.volumes = vmi_spec.volumes or [] diff --git a/libs/vm/spec.py b/libs/vm/spec.py index 24fd13fdbe..f705b9df2b 100644 --- a/libs/vm/spec.py +++ b/libs/vm/spec.py @@ -27,6 +27,7 @@ class Metadata: @dataclass class VMISpec: domain: Domain + architecture: str | None = None networks: list[Network] | None = None volumes: list[Volume] | None = None terminationGracePeriodSeconds: int | None = None # noqa: N815