Skip to content

Conversation

@Anatw
Copy link
Contributor

@Anatw Anatw commented Dec 2, 2025

Short description:
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:

Summary by CodeRabbit

  • Tests

    • Test suite now requires an explicit admin client for creating/managing network resources; many fixtures propagate admin or unprivileged clients for clearer privilege separation.
    • CNV upgrade stream determination added to support upgrade-path testing.
    • NAD resources in some fixtures are cleaned up after tests to improve teardown reliability.
  • Bug Fixes

    • Network resource constructors and policies now enforce an explicit client parameter for authenticated operations.

✏️ Tip: You can customize this high-level summary in your review settings.

@Anatw
Copy link
Contributor Author

Anatw commented Dec 2, 2025

/wip

@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Walkthrough

Made DynamicClient explicit across networking code and tests: many constructors and helper functions now require a client parameter (passed as admin_client or unprivileged_client in fixtures), and ~40+ test fixtures were updated to propagate that client into network resource creation and helpers.

Changes

Cohort / File(s) Summary
Core net model
libs/net/netattachdef.py
NetworkAttachmentDefinition.__init__ now requires a DynamicClient (client) parameter (no longer optional); docstring updated.
Network utilities
utilities/network.py
Added client: DynamicClient parameter to network constructors/functions (e.g., network_nad, network_device, create_sriov_node_policy, Bridge/OVS/LinuxBridge/VLAN/Bond NNCP classes, EthernetNetworkConfigurationPolicy) and propagated client into super/init calls and kwargs.
Test libraries
tests/network/libs/*.py, tests/virt/node/migration_and_maintenance/utils.py
Added client: DynamicClient to constructors: ClusterUserDefinedNetwork, NodeNetworkConfigurationPolicy, MACVLANNetworkAttachmentDefinition (made mandatory); updated imports and docstrings; forwarded client to base classes.
Test helpers / utilities
tests/network/l2_bridge/utils.py, tests/network/flat_overlay/utils.py, tests/network/localnet/liblocalnet.py, utilities/ssp.py, tests/network/utils.py
Added client parameters to helper functions (e.g., create_bridge_interface_for_hot_plug, wait_for_multi_network_policy_resources, localnet_cudn, create_nncp_localnet_on_secondary_node_nic, create_custom_template_from_url, service/deployment helpers) and forwarded client to resource constructors.
Global fixtures & conftest
tests/conftest.py, tests/install_upgrade_operators/must_gather/conftest.py, tests/network/**/conftest.py (many)
Added admin_client/unprivileged_client parameters to ~40+ fixture signatures, wired client=admin_client/client=unprivileged_client into NAD/device/NNCP/CUDN/VM/template creation. Added cnv_upgrade_stream fixture and determine_upgrade_stream() helper.
Test modules & fixtures
tests/network/**, tests/virt/**, tests/storage/**, tests/infrastructure/sap/**, ...
Updated many fixture signatures and call-sites to accept and pass admin_client/unprivileged_client; some fixtures now perform explicit cleanup (e.g., sriov_nads calls nad.clean_up() after yield).
Unit tests
utilities/unittests/test_ssp.py
Updated unit test to pass mock client into create_custom_template_from_url and assert Template(..., client=...) invocation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas requiring extra attention:
    • utilities/network.py — many signature changes; verify parameter ordering, propagation to super().init, and no missing caller updates.
    • Fixture dependency chains — ensure admin_client/unprivileged_client is added transitively across long fixture graphs.
    • tests/network/localnet/ and tests/network/libs/ — public constructor signature changes.
    • New upgrade helper (determine_upgrade_stream) and cnv_upgrade_stream — validate logic and error handling.

Possibly related PRs

Suggested labels

size/XXL

Suggested reviewers

  • rnetser
  • vsibirsk
  • dshchedr
  • geetikakay
  • EdDev
  • yossisegev
  • RoniKishner
  • servolkov

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is entirely empty except for the template headings; no substantive content, rationale, or Jira ticket information is provided. Fill in all required sections: provide a short description, detailed explanation, rationale for the changes, issue(s) being fixed, reviewer notes, and a valid Jira ticket URL or 'NONE'.
Docstring Coverage ⚠️ Warning Docstring coverage is 13.53% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'WIP: Client all test' is too vague and does not clearly describe the main change; it uses non-descriptive terms like 'Client all test' that don't convey meaningful information about the changeset. Provide a more descriptive title that summarizes the main change, such as 'Propagate admin_client and unprivileged_client to network test fixtures' or 'Thread client parameter through network utilities and test fixtures'.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-virtualization-qe-bot-3
Copy link
Contributor

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Pre-commit Checks: pre-commit runs automatically if .pre-commit-config.yaml exists
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No WIP, hold, or conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • EdDev
  • dshchedr
  • jpeimer
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Ahmad-Hafe
  • Anatw
  • EdDev
  • OhadRevah
  • RoniKishner
  • SamAlber
  • SiboWang1997
  • akri3i
  • albarker-rh
  • azhivovk
  • dalia-frank
  • dshchedr
  • duyanyan
  • geetikakay
  • hmeir
  • jerry7z
  • josemacassan
  • jpeimer
  • kbidarkar
  • kgoldbla
  • kshvaika
  • rlobillo
  • rnetser
  • servolkov
  • stesrn
  • vsibirsk
  • yossisegev
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.28%. Comparing base (f0cfa42) to head (37192c2).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2965   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          25       25           
  Lines        2157     2157           
=======================================
  Hits         2120     2120           
  Misses         37       37           
Flag Coverage Δ
utilities 98.28% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Anatw
Copy link
Contributor Author

Anatw commented Dec 2, 2025

/build-and-push-container

Anatw added 8 commits December 4, 2025 09:50
This change makes the client mandatory for all NAD-related resources.
Updated fixtures so that all calls to openshift-python-wrapper NAD
resources explicitly pass a client.

Signed-off-by: Anat Wax <[email protected]>
Make NNCP-related classes take a mandatory DynamicClient and update all
NNCP-related fixtures to pass an admin_client explicitly (no implicit
default clients).

Signed-off-by: Anat Wax <[email protected]>
This change makes the client mandatory for all CUDN-related resources.
Updated fixtures so that all calls to openshift-python-wrapper CUDN
resources explicitly pass a client.

Signed-off-by: Anat Wax <[email protected]>
Updated class instance and fixtures - all calls to
openshift-python-wrapper resource should be updated to pass client.

Signed-off-by: Anat Wax <[email protected]>
Updated all OCP wrapper class instantiations across the network segment
with the relevant client parameter.

Signed-off-by: Anat Wax <[email protected]>
Updated class instance and fixtures - all calls to openshift-python-wrapper resource should be updated to pass client.

Signed-off-by: Anat Wax <[email protected]>
Make create_custom_template_from_url take a mandatory DynamicClient
and update all call sites to pass an admin_client explicitly (no
implicit default clients).

Signed-off-by: Anat Wax <[email protected]>
Updated VM fixtures - all calls to openshift-python-wrapper resource
should be updated to pass client.

Signed-off-by: Anat Wax <[email protected]>
@Anatw
Copy link
Contributor Author

Anatw commented Dec 4, 2025

/build-and-push-container

@openshift-virtualization-qe-bot-2
Copy link
Contributor

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-2965 published

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/conftest.py (1)

1786-1833: Fix undefined cnv_current_version in determine_upgrade_stream and clarify version assumptions

In determine_upgrade_stream (Lines 1810‑1833):

  • The ValueError raised for non-upgrade scenarios references cnv_current_version, which is not defined in this function, and will trigger a NameError instead of the intended ValueError when target_cnv_version <= current_cnv_version.

You can fix this by using the function parameters (or the parsed versions) in the error message:

 def determine_upgrade_stream(current_version, target_version):
@@
     elif HOTFIX_STR in current_version:
         # if we reach here, this is an upgrade out of hotfix to next z-stream
         return UpgradeStreams.Z_STREAM
     else:
         if target_cnv_version <= current_cnv_version:
             # Upgrade only if a newer CNV version is requested
             raise ValueError(
-                f"Cannot upgrade to older/identical versions,"
-                f"current: {cnv_current_version} target: {target_cnv_version}"
+                f"Cannot upgrade to older/identical versions, "
+                f"current: {current_version} target: {target_version}"
             )

Also, this helper assumes current_version and target_version are non-empty, valid version strings. If cnv_current_version can be "CNV not yet installed." or None, or cnv_target_version is unset, consider either guarding against that in cnv_upgrade_stream before calling this helper or documenting that precondition.

🧹 Nitpick comments (7)
tests/infrastructure/sap/test_sap_hana_vm.py (1)

343-358: Refactor cleanup: use explicit loop instead of list comprehension.

The admin_client propagation looks correct and aligns with the broader PR pattern. However, line 358 uses a list comprehension for side effects (calling clean_up()), which is non-idiomatic Python. List comprehensions should be used for building lists, not for executing side effects.

Apply this diff to improve code clarity:

     yield nads_list
-    [nad.clean_up() for nad in nads_list]
+    for nad in nads_list:
+        nad.clean_up()
tests/conftest.py (1)

586-655: Admin client wiring for NIC/SRIOV fixtures looks correct; address unused workers_utility_pods

  • Using admin_client explicitly in nodes_active_nics (Line 587) via NodeNetworkState(name=node.name, client=admin_client) and in worker_nodes_ipv4_false_secondary_nics, sriov_namespace, and mac_pool is consistent with how other ocp_resources wrappers are instantiated and should behave as before, just with an explicit client.
  • In sriov_node_policy (Lines 1075‑1089), the new client=admin_client argument passed into create_sriov_node_policy is also consistent with utilities.network.create_sriov_node_policy’s signature.

Ruff’s ARG001 for workers_utility_pods being unused (Line 1079) can be fixed without changing fixture wiring by explicitly marking it as used:

 @pytest.fixture(scope="session")
 def sriov_node_policy(
     admin_client,
     sriov_unused_ifaces,
     sriov_nodes_states,
-    workers_utility_pods,
+    workers_utility_pods,
     sriov_namespace,
 ):
+    # Ensure workers_utility_pods fixture is executed even though it is not used directly here.
+    _ = workers_utility_pods
     yield from create_sriov_node_policy(
         nncp_name="test-sriov-policy",
         namespace=sriov_namespace.name,
         sriov_iface=sriov_unused_ifaces[0],
         sriov_nodes_states=sriov_nodes_states,
         sriov_resource_name="sriov_net",
         client=admin_client,
     )

Also applies to: 965-1098

tests/network/service_mesh/conftest.py (1)

46-154: Service mesh resources now consistently use explicit clients; mark unused fixture dependency

  • The test wrapper classes GatewayForTests, DestinationRuleForTests, VirtualServiceForTests, and PeerAuthenticationForTests now take a client parameter and pass client=client to their respective ocp_resources base classes. This aligns them with other resource wrappers and looks correct.
  • Fixtures such as httpbin_deployment_service_mesh, httpbin_service_account_service_mesh, httpbin_service_service_mesh, server_deployment_v1/v2, server_service_service_mesh, gateway_service_mesh, virtual_service_mesh_service, destination_rule_service_mesh, and peer_authentication_strict_service_mesh now receive unprivileged_client and pass it as client=unprivileged_client when creating resources. That matches how unprivileged_client is provided in tests/conftest.py and should behave as intended.

Ruff’s ARG001 warning for the unused httpbin_service_account_service_mesh fixture argument in httpbin_service_service_mesh (Line 223) can be resolved without changing fixture wiring by explicitly marking it as used:

 @pytest.fixture(scope="class")
 def httpbin_service_service_mesh(
-    unprivileged_client, httpbin_deployment_service_mesh, httpbin_service_account_service_mesh
+    unprivileged_client, httpbin_deployment_service_mesh, httpbin_service_account_service_mesh
 ):
+    # Ensure service account fixture is executed, even if not referenced directly.
+    _ = httpbin_service_account_service_mesh
     with ServiceMeshDeploymentService(
         namespace=httpbin_deployment_service_mesh.namespace,
         app_name=httpbin_deployment_service_mesh.app_name,
         port=httpbin_deployment_service_mesh.service_port,
         client=unprivileged_client,
     ) as sv:
         yield sv

Also applies to: 191-347, 416-421

tests/network/localnet/conftest.py (1)

44-61: Localnet NNCP/CUDN fixtures correctly use admin_client; silence unused namespace_localnet_1

  • nncp_localnet (Lines 44‑61) now takes admin_client: DynamicClient and passes client=admin_client into libnncp.NodeNetworkConfigurationPolicy, which matches its constructor signature.
  • cudn_localnet, cudn_localnet_no_vlan, cudn_localnet_ovs_bridge, and cudn_localnet_ovs_bridge_jumbo_frame now pass client=admin_client to localnet_cudn, which in turn forwards the client to ClusterUserDefinedNetwork. This is consistent with the library’s expectations.
  • nncp_localnet_on_secondary_node_nic and nncp_localnet_on_secondary_node_nic_with_jumbo_frame correctly thread client=admin_client into create_nncp_localnet_on_secondary_node_nic, including the MTU parameter for the jumbo-frame variant.

For cudn_localnet_no_vlan (Lines 110‑118), Ruff’s ARG001 on the seemingly unused namespace_localnet_1 can be addressed while preserving fixture dependency by explicitly referencing it:

 @pytest.fixture(scope="module")
 def cudn_localnet_no_vlan(
     admin_client: DynamicClient,
     namespace_localnet_1: Namespace,
 ) -> Generator[libcudn.ClusterUserDefinedNetwork]:
-    with localnet_cudn(
+    # Ensure namespace_localnet_1 is created and labeled before creating the CUDN.
+    _ = namespace_localnet_1
+    with localnet_cudn(
         name=LOCALNET_BR_EX_NETWORK_NO_VLAN,
         match_labels=LOCALNET_TEST_LABEL,
         physical_network_name=LOCALNET_BR_EX_NETWORK,
         client=admin_client,
     ) as cudn:
         cudn.wait_for_status_success()
         yield cudn

Also applies to: 92-121, 215-229, 361-385, 388-403

tests/network/kubemacpool/test_kubemacpool.py (1)

127-134: test_kmp_down now uses unprivileged_client; explicitly mark kmp_down as used

  • Passing client=unprivileged_client into VirtualMachineForTests (Line 133) is consistent with other tests and with the unprivileged client fixture semantics.

To satisfy Ruff’s ARG001 about the unused kmp_down argument (Line 131) while preserving the dependency on the kmp_down fixture, you can explicitly reference it:

@pytest.mark.sno
@pytest.mark.polarion("CNV-4405")
@pytest.mark.single_nic
@pytest.mark.s390x
def test_kmp_down(unprivileged_client, namespace, kmp_down):
-    with pytest.raises(ApiException):
-        with VirtualMachineForTests(name="kmp-down-vm", namespace=namespace.name, client=unprivileged_client):
-            return
+    # Ensure kmp_down fixture is executed, even if its value is not used directly.
+    _ = kmp_down
+    with pytest.raises(ApiException):
+        with VirtualMachineForTests(name="kmp-down-vm", namespace=namespace.name, client=unprivileged_client):
+            return
tests/network/general/test_bridge_marker.py (1)

22-33: Consider adding explicit client parameter for consistency.

The create_bridge_attached_vm_for_bridge_marker helper does not accept or pass a client parameter to VirtualMachineForTests, while the similar multi_bridge_attached_vmi fixture (line 99) explicitly uses unprivileged_client. This inconsistency could be addressed in a follow-up.

 @contextmanager
-def create_bridge_attached_vm_for_bridge_marker(namespace, bridge_marker_bridge_network):
+def create_bridge_attached_vm_for_bridge_marker(namespace, bridge_marker_bridge_network, client=None):
     networks = {bridge_marker_bridge_network.name: bridge_marker_bridge_network.name}
     name = _get_name(suffix="bridge-vm")
     with VirtualMachineForTests(
         namespace=namespace.name,
         name=name,
         networks=networks,
         interfaces=sorted(networks.keys()),
         body=fedora_vm_body(name=name),
+        client=client,
     ) as vm:
         yield vm
utilities/network.py (1)

177-223: Consider consistent parameter placement across similar classes.

The client parameter appears after bridge_name here, but in the parent class BridgeNodeNetworkConfigurationPolicy it appears after stp_config. While not incorrect, consistent positioning (e.g., always immediately after required positional parameters or always in the same relative position) would improve maintainability.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d87db9 and 37192c2.

📒 Files selected for processing (46)
  • libs/net/netattachdef.py (2 hunks)
  • tests/conftest.py (9 hunks)
  • tests/infrastructure/sap/test_sap_hana_vm.py (3 hunks)
  • tests/install_upgrade_operators/must_gather/conftest.py (1 hunks)
  • tests/network/bgp/conftest.py (3 hunks)
  • tests/network/bond/test_bond_modes.py (9 hunks)
  • tests/network/bond/test_l2_bridge_over_bond.py (7 hunks)
  • tests/network/conftest.py (6 hunks)
  • tests/network/connectivity/conftest.py (13 hunks)
  • tests/network/dry_run/test_dry_run_kubemacpool.py (1 hunks)
  • tests/network/flat_overlay/conftest.py (6 hunks)
  • tests/network/flat_overlay/utils.py (1 hunks)
  • tests/network/general/test_bridge_marker.py (2 hunks)
  • tests/network/general/test_cnv_tuning_regression.py (1 hunks)
  • tests/network/general/test_ip_family_services.py (2 hunks)
  • tests/network/jumbo_frame/conftest.py (1 hunks)
  • tests/network/jumbo_frame/test_bond.py (8 hunks)
  • tests/network/jumbo_frame/test_bridge.py (4 hunks)
  • tests/network/kubemacpool/conftest.py (16 hunks)
  • tests/network/kubemacpool/test_kubemacpool.py (1 hunks)
  • tests/network/l2_bridge/conftest.py (7 hunks)
  • tests/network/l2_bridge/test_bridge_nic_hot_plug.py (7 hunks)
  • tests/network/l2_bridge/test_ovs_bridge.py (2 hunks)
  • tests/network/l2_bridge/utils.py (2 hunks)
  • tests/network/libs/cluster_user_defined_network.py (3 hunks)
  • tests/network/libs/nodenetworkconfigurationpolicy.py (3 hunks)
  • tests/network/localnet/conftest.py (8 hunks)
  • tests/network/localnet/liblocalnet.py (6 hunks)
  • tests/network/macspoof/conftest.py (2 hunks)
  • tests/network/migration/test_migration.py (3 hunks)
  • tests/network/nmstate/conftest.py (4 hunks)
  • tests/network/nmstate/test_connectivity_after_nmstate_changes.py (2 hunks)
  • tests/network/service_mesh/conftest.py (11 hunks)
  • tests/network/sriov/conftest.py (4 hunks)
  • tests/network/upgrade/conftest.py (2 hunks)
  • tests/network/upgrade/utils.py (1 hunks)
  • tests/network/user_defined_network/test_user_defined_network.py (1 hunks)
  • tests/network/utils.py (5 hunks)
  • tests/storage/cdi_import/conftest.py (1 hunks)
  • tests/virt/cluster/common_templates/windows/test_windows_custom_options.py (1 hunks)
  • tests/virt/node/high_performance_vm/test_numa.py (1 hunks)
  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py (1 hunks)
  • tests/virt/node/migration_and_maintenance/utils.py (1 hunks)
  • utilities/network.py (19 hunks)
  • utilities/ssp.py (2 hunks)
  • utilities/unittests/test_ssp.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (13)
  • tests/storage/cdi_import/conftest.py
  • tests/virt/node/high_performance_vm/test_numa.py
  • tests/network/l2_bridge/test_bridge_nic_hot_plug.py
  • tests/virt/cluster/common_templates/windows/test_windows_custom_options.py
  • tests/network/sriov/conftest.py
  • tests/network/connectivity/conftest.py
  • tests/network/nmstate/test_connectivity_after_nmstate_changes.py
  • tests/network/macspoof/conftest.py
  • tests/network/upgrade/utils.py
  • tests/network/flat_overlay/conftest.py
  • tests/network/jumbo_frame/test_bridge.py
  • tests/network/general/test_ip_family_services.py
  • tests/network/user_defined_network/test_user_defined_network.py
🧰 Additional context used
🧠 Learnings (25)
📓 Common learnings
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 2469
File: utilities/sanity.py:139-142
Timestamp: 2025-11-08T07:36:57.616Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers to keep refactoring PRs (like PR #2469) strictly focused on moving/organizing code into more granular modules without adding new functionality, error handling, or behavioral changes. Such improvements should be handled in separate PRs.
Learnt from: vamsikrishna-siddu
Repo: RedHatQE/openshift-virtualization-tests PR: 2199
File: tests/storage/test_online_resize.py:108-113
Timestamp: 2025-09-28T14:43:07.181Z
Learning: In the openshift-virtualization-tests repo, PR #2199 depends on PR #2139 which adds architecture-specific OS_FLAVOR attributes to the Images.Cirros class (OS_FLAVOR_CIRROS for x86_64/ARM64, OS_FLAVOR_FEDORA for s390x), enabling conditional logic based on the underlying OS flavor in tests.
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 2045
File: tests/virt/cluster/vm_lifecycle/conftest.py:46-47
Timestamp: 2025-09-15T06:49:53.478Z
Learning: In the openshift-virtualization-tests repo, large fixture refactoring efforts like the golden image data source migration are handled incrementally by directory/team ownership. The virt/cluster directory is handled separately from virt/node, tests/infra, tests/storage, etc., with each area managed by relevant teams in follow-up PRs.
Learnt from: vamsikrishna-siddu
Repo: RedHatQE/openshift-virtualization-tests PR: 2199
File: tests/storage/test_online_resize.py:108-113
Timestamp: 2025-09-28T14:43:07.181Z
Learning: In the openshift-virtualization-tests repo, PR #2199 depends on PR #2139 which adds the OS_FLAVOR attribute to the Images.Cirros class, making Images.Cirros.OS_FLAVOR available for conditional logic in tests.
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 2838
File: .github/workflows/net-utils-builder-staging.yml:37-37
Timestamp: 2025-11-25T01:56:54.902Z
Learning: In the openshift-virtualization-tests repository, when renaming container images that are built and used by GitHub Actions workflows, the changes must be done sequentially: first merge the workflow files (.github/workflows/) that update the image name in the CI/CD pipelines, then update the code references (like constants.py and manifest files) in a follow-up PR. This prevents the old workflow from running with mismatched image names during the transition.
Learnt from: SiboWang1997
Repo: RedHatQE/openshift-virtualization-tests PR: 1566
File: tests/global_config_x86_64.py:29-29
Timestamp: 2025-07-25T01:59:02.180Z
Learning: In the openshift-virtualization-tests repo, the s390x architecture still relies on Fedora 41 images, while only x86_64 is updated to Fedora 42 in PR #1566.
Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 1678
File: utilities/oadp.py:5-5
Timestamp: 2025-08-28T11:29:15.768Z
Learning: In the openshift-virtualization-tests project, DynamicClient is imported from kubernetes.dynamic, not openshift.dynamic. The standard import pattern is `from kubernetes.dynamic import DynamicClient`.
Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 1678
File: utilities/oadp.py:5-5
Timestamp: 2025-08-28T11:29:15.768Z
Learning: In the openshift-virtualization-tests project, DynamicClient is imported from kubernetes.dynamic, not openshift.dynamic. The standard import pattern is `from kubernetes.dynamic import DynamicClient`.
Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 1678
File: utilities/oadp.py:1-5
Timestamp: 2025-09-07T13:16:32.011Z
Learning: In the openshift-virtualization-tests project utilities/oadp.py, DynamicClient instances are passed as parameters rather than created internally, so kubernetes.config import is not needed for client creation fallback patterns.
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1028
File: utilities/infra.py:1257-1258
Timestamp: 2025-08-06T13:57:34.740Z
Learning: In the openshift-virtualization-tests repository, all existing calls to the `get_cluster_platform` function in utilities/infra.py already pass the `admin_client` parameter, so the breaking change requiring this parameter does not actually break any existing code.
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1028
File: utilities/infra.py:1249-1254
Timestamp: 2025-08-06T13:57:51.928Z
Learning: User rnetser verified that all calls to get_infrastructure() function use the admin_client parameter, confirming that signature changes requiring this parameter don't cause breaking changes in the openshift-virtualization-tests codebase.
📚 Learning: 2025-09-07T13:16:32.011Z
Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 1678
File: utilities/oadp.py:1-5
Timestamp: 2025-09-07T13:16:32.011Z
Learning: In the openshift-virtualization-tests project utilities/oadp.py, DynamicClient instances are passed as parameters rather than created internally, so kubernetes.config import is not needed for client creation fallback patterns.

Applied to files:

  • tests/network/flat_overlay/utils.py
  • tests/network/libs/nodenetworkconfigurationpolicy.py
  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
  • tests/network/libs/cluster_user_defined_network.py
  • tests/network/dry_run/test_dry_run_kubemacpool.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/l2_bridge/test_ovs_bridge.py
  • utilities/network.py
  • tests/network/kubemacpool/conftest.py
  • tests/network/utils.py
  • tests/network/kubemacpool/test_kubemacpool.py
📚 Learning: 2025-08-06T13:57:51.928Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1028
File: utilities/infra.py:1249-1254
Timestamp: 2025-08-06T13:57:51.928Z
Learning: User rnetser verified that all calls to get_infrastructure() function use the admin_client parameter, confirming that signature changes requiring this parameter don't cause breaking changes in the openshift-virtualization-tests codebase.

Applied to files:

  • tests/network/flat_overlay/utils.py
  • tests/network/upgrade/conftest.py
  • tests/network/jumbo_frame/test_bond.py
  • tests/network/general/test_cnv_tuning_regression.py
  • tests/infrastructure/sap/test_sap_hana_vm.py
  • tests/virt/node/migration_and_maintenance/utils.py
  • tests/network/l2_bridge/conftest.py
  • tests/install_upgrade_operators/must_gather/conftest.py
  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
  • tests/network/nmstate/conftest.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/dry_run/test_dry_run_kubemacpool.py
  • tests/network/bond/test_bond_modes.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/l2_bridge/test_ovs_bridge.py
  • tests/network/kubemacpool/conftest.py
  • tests/network/utils.py
  • tests/network/general/test_bridge_marker.py
  • tests/network/bgp/conftest.py
  • tests/network/kubemacpool/test_kubemacpool.py
  • tests/network/migration/test_migration.py
  • tests/network/service_mesh/conftest.py
📚 Learning: 2025-08-06T13:57:34.740Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1028
File: utilities/infra.py:1257-1258
Timestamp: 2025-08-06T13:57:34.740Z
Learning: In the openshift-virtualization-tests repository, all existing calls to the `get_cluster_platform` function in utilities/infra.py already pass the `admin_client` parameter, so the breaking change requiring this parameter does not actually break any existing code.

Applied to files:

  • tests/network/upgrade/conftest.py
  • tests/network/jumbo_frame/test_bond.py
  • tests/network/general/test_cnv_tuning_regression.py
  • tests/infrastructure/sap/test_sap_hana_vm.py
  • tests/virt/node/migration_and_maintenance/utils.py
  • tests/network/l2_bridge/conftest.py
  • tests/install_upgrade_operators/must_gather/conftest.py
  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
  • tests/network/nmstate/conftest.py
  • tests/conftest.py
  • tests/network/dry_run/test_dry_run_kubemacpool.py
  • tests/network/bond/test_bond_modes.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/l2_bridge/test_ovs_bridge.py
  • tests/network/kubemacpool/conftest.py
  • tests/network/utils.py
  • tests/network/general/test_bridge_marker.py
  • tests/network/kubemacpool/test_kubemacpool.py
  • tests/network/migration/test_migration.py
  • tests/network/service_mesh/conftest.py
📚 Learning: 2025-09-02T11:16:59.950Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1904
File: tests/conftest.py:589-593
Timestamp: 2025-09-02T11:16:59.950Z
Learning: In tests/conftest.py, for non-baremetal/PSI clusters in the nodes_active_nics fixture, the user prefers to populate the "occupied" field with actual physical NICs from node_physical_nics rather than leaving it empty, to provide downstream consumers with visibility into physical NIC inventory even when NMState isn't managing them.

Applied to files:

  • tests/network/upgrade/conftest.py
  • tests/network/jumbo_frame/test_bond.py
  • tests/network/general/test_cnv_tuning_regression.py
  • tests/network/l2_bridge/conftest.py
  • tests/install_upgrade_operators/must_gather/conftest.py
  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
  • tests/network/bond/test_l2_bridge_over_bond.py
  • tests/network/nmstate/conftest.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/dry_run/test_dry_run_kubemacpool.py
  • tests/network/bond/test_bond_modes.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/kubemacpool/conftest.py
  • tests/network/general/test_bridge_marker.py
  • tests/network/bgp/conftest.py
  • tests/network/migration/test_migration.py
📚 Learning: 2025-06-18T09:21:34.315Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/conftest.py:1065-1077
Timestamp: 2025-06-18T09:21:34.315Z
Learning: In tests/observability/metrics/conftest.py, when creating fixtures that modify shared Windows VM state (like changing nodeSelector), prefer using function scope rather than class scope to ensure ResourceEditor context managers properly restore the VM state after each test, maintaining test isolation while still reusing expensive Windows VM fixtures.

Applied to files:

  • tests/network/upgrade/conftest.py
  • tests/network/general/test_cnv_tuning_regression.py
  • tests/infrastructure/sap/test_sap_hana_vm.py
  • tests/network/l2_bridge/conftest.py
  • tests/install_upgrade_operators/must_gather/conftest.py
  • tests/network/nmstate/conftest.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/kubemacpool/conftest.py
  • tests/network/general/test_bridge_marker.py
  • tests/network/bgp/conftest.py
  • tests/network/kubemacpool/test_kubemacpool.py
  • tests/network/service_mesh/conftest.py
📚 Learning: 2025-08-28T12:30:40.692Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 1776
File: tests/network/bgp/conftest.py:35-54
Timestamp: 2025-08-28T12:30:40.692Z
Learning: The BGP test suite in tests/network/bgp/ relies on session-scoped validation in tests/network/conftest.py via the network_sanity fixture's _verify_bgp() function, which validates required environment variables (VLAN_TAG, EXTERNAL_FRR_STATIC_IPV4, BGP_CLUSTER_DOMAIN_GROUP) before any BGP tests run, making individual fixture-level validation redundant.

Applied to files:

  • tests/network/upgrade/conftest.py
  • tests/network/jumbo_frame/test_bond.py
  • tests/network/general/test_cnv_tuning_regression.py
  • tests/network/l2_bridge/conftest.py
  • tests/install_upgrade_operators/must_gather/conftest.py
  • tests/network/bond/test_l2_bridge_over_bond.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/dry_run/test_dry_run_kubemacpool.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/l2_bridge/test_ovs_bridge.py
  • tests/network/general/test_bridge_marker.py
  • tests/network/bgp/conftest.py
📚 Learning: 2025-08-28T11:29:15.768Z
Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 1678
File: utilities/oadp.py:5-5
Timestamp: 2025-08-28T11:29:15.768Z
Learning: In the openshift-virtualization-tests project, DynamicClient is imported from kubernetes.dynamic, not openshift.dynamic. The standard import pattern is `from kubernetes.dynamic import DynamicClient`.

Applied to files:

  • tests/network/libs/nodenetworkconfigurationpolicy.py
  • tests/network/libs/cluster_user_defined_network.py
📚 Learning: 2025-10-27T15:30:06.412Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1904
File: tests/network/conftest.py:348-362
Timestamp: 2025-10-27T15:30:06.412Z
Learning: In tests/network/conftest.py, the _verify_nmstate_running_pods function currently runs unconditionally in network_sanity, but rnetser plans to implement marker-based conditional checking (following the pattern of _verify_dpdk, _verify_sriov, etc.) in a future PR after adding nmstate markers to the relevant tests.

Applied to files:

  • tests/network/general/test_cnv_tuning_regression.py
  • tests/network/nmstate/conftest.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/dry_run/test_dry_run_kubemacpool.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/general/test_bridge_marker.py
  • tests/network/bgp/conftest.py
📚 Learning: 2025-09-29T20:33:51.007Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 1932
File: tests/virt/node/migration_and_maintenance/conftest.py:65-72
Timestamp: 2025-09-29T20:33:51.007Z
Learning: In tests/virt/node/migration_and_maintenance/conftest.py, the added_vm_cpu_limit fixture doesn't require ResourceEditor as a context manager because it's the final test to modify the vm_for_multifd_test VM before teardown, so restoration of CPU limits is unnecessary overhead as confirmed by maintainer dshchedr.

Applied to files:

  • tests/network/l2_bridge/conftest.py
  • tests/install_upgrade_operators/must_gather/conftest.py
  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/conftest.py
  • tests/network/kubemacpool/conftest.py
  • tests/network/bgp/conftest.py
  • tests/network/kubemacpool/test_kubemacpool.py
📚 Learning: 2025-06-13T01:08:18.579Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 890
File: tests/virt/node/descheduler/conftest.py:146-148
Timestamp: 2025-06-13T01:08:18.579Z
Learning: The fixture `vms_orig_nodes_before_node_drain` in tests/virt/node/descheduler/conftest.py is intentionally kept with the “node_drain” suffix because it represents the state directly before a node drain step; future refactor suggestions should preserve this name unless requirements change.

Applied to files:

  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
📚 Learning: 2025-09-29T19:05:24.987Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-09-29T19:05:24.987Z
Learning: For PR #1904 test execution, the critical validation point is test_connectivity_over_migration_between_localnet_vms which should fail gracefully on cloud clusters but pass on bare-metal/PSI clusters, representing the core nmstate conditional logic functionality.

Applied to files:

  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/conftest.py
📚 Learning: 2025-10-08T07:16:46.347Z
Learnt from: HarshithaMS005
Repo: RedHatQE/openshift-virtualization-tests PR: 2027
File: tests/network/nmstate/test_connectivity_after_nmstate_changes.py:231-233
Timestamp: 2025-10-08T07:16:46.347Z
Learning: Network tests in the openshift-virtualization-tests repository have a sanity check in tests/network/conftest.py (around line 237) that validates len(hosts_common_available_ports) > 1 before tests run. This ensures multinic tests requiring hosts_common_available_ports[-2] won't encounter IndexError, making fixture-level guards redundant.

Applied to files:

  • tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py
  • tests/conftest.py
  • tests/network/localnet/conftest.py
  • tests/network/jumbo_frame/conftest.py
  • tests/network/conftest.py
  • tests/network/bgp/conftest.py
📚 Learning: 2025-08-04T15:27:14.175Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/conftest.py:1065-1082
Timestamp: 2025-08-04T15:27:14.175Z
Learning: In tests/observability/metrics/conftest.py, the `non_existent_node_windows_vm` fixture is used for tier3 Windows VM testing and must use Windows VMs rather than Linux VMs, even though it adds overhead, because it's specifically testing Windows VM status transition metrics as part of dedicated Windows VM test coverage.

Applied to files:

  • tests/conftest.py
📚 Learning: 2025-09-12T08:10:48.874Z
Learnt from: rlobillo
Repo: RedHatQE/openshift-virtualization-tests PR: 1984
File: tests/install_upgrade_operators/network_policy/test_network_policy_components.py:16-16
Timestamp: 2025-09-12T08:10:48.874Z
Learning: Network policy tests that create different types of pods (client pod, server pod, existing component pods) for connectivity testing can run on SNO, as they don't require multiple replicas of the same component to function properly.

Applied to files:

  • tests/conftest.py
  • tests/network/dry_run/test_dry_run_kubemacpool.py
  • tests/network/general/test_bridge_marker.py
  • tests/network/migration/test_migration.py
  • tests/network/service_mesh/conftest.py
📚 Learning: 2025-09-12T14:14:28.329Z
Learnt from: rlobillo
Repo: RedHatQE/openshift-virtualization-tests PR: 1984
File: tests/install_upgrade_operators/network_policy/test_network_policy_components.py:182-187
Timestamp: 2025-09-12T14:14:28.329Z
Learning: Network policy tests in the RedHatQE/openshift-virtualization-tests repository don't require unique resource names as there are no parallel runs on the same cluster in their test environment.

Applied to files:

  • tests/conftest.py
📚 Learning: 2025-09-08T21:34:28.924Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 1932
File: tests/virt/node/migration_and_maintenance/conftest.py:57-64
Timestamp: 2025-09-08T21:34:28.924Z
Learning: In OpenShift Virtualization tests, MigrationPolicy fixtures should use static names rather than unique suffixes to enable collision detection. If parallel test runs collide on cluster-scoped resource names like MigrationPolicy, it's better to know about the collision rather than hide it with unique naming, as confirmed by maintainer dshchedr.

Applied to files:

  • tests/conftest.py
📚 Learning: 2025-08-20T23:57:48.380Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 1840
File: tests/virt/node/workload_density/test_swap.py:88-89
Timestamp: 2025-08-20T23:57:48.380Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, CNV installation and health are verified by sanity tests before other tests run, so hco_namespace is guaranteed to exist in the testing environment. Defensive programming against nil hco_namespace scenarios is not needed in fixtures.

Applied to files:

  • tests/conftest.py
📚 Learning: 2025-06-18T09:31:06.311Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/conftest.py:1065-1077
Timestamp: 2025-06-18T09:31:06.311Z
Learning: In tests/observability/metrics/conftest.py, ResourceEditor context managers automatically restore VM configuration when the context exits, including nodeSelector patches. The fixture pattern with `with ResourceEditor(patches={vm: {...}})` followed by `yield` properly restores the VM to its original state without requiring manual teardown logic.

Applied to files:

  • tests/network/kubemacpool/conftest.py
📚 Learning: 2025-06-23T19:19:31.961Z
Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/conftest.py:83-97
Timestamp: 2025-06-23T19:19:31.961Z
Learning: In OpenShift Virtualization mass machine type transition tests, the kubevirt_api_lifecycle_automation_job requires cluster-admin privileges to function properly, as confirmed by the test maintainer akri3i.

Applied to files:

  • tests/network/kubemacpool/conftest.py
  • tests/network/kubemacpool/test_kubemacpool.py
📚 Learning: 2025-06-18T09:19:05.769Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/test_vms_metrics.py:129-137
Timestamp: 2025-06-18T09:19:05.769Z
Learning: For Windows VM testing in tests/observability/metrics/test_vms_metrics.py, it's acceptable to have more fixture parameters than typical pylint recommendations when reusing expensive Windows VM fixtures for performance. Windows VMs take a long time to deploy, so reusing fixtures like windows_vm_for_test and adding labels via windows_vm_with_low_bandwidth_migration_policy is preferred over creating separate fixtures that would require additional VM deployments.

Applied to files:

  • tests/network/kubemacpool/conftest.py
📚 Learning: 2025-09-08T22:06:55.755Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 1987
File: tests/virt/node/descheduler/conftest.py:165-170
Timestamp: 2025-09-08T22:06:55.755Z
Learning: In ocp-resources library, the .get() method expects the namespace object (not the string name) when passed as the namespace parameter, as confirmed in VirtualMachineInstanceMigration.get(dyn_client=admin_client, namespace=namespace) usage in tests/virt/node/descheduler/conftest.py.

Applied to files:

  • tests/network/utils.py
📚 Learning: 2025-10-31T13:05:24.570Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 2119
File: tests/network/localnet/conftest.py:352-366
Timestamp: 2025-10-31T13:05:24.570Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, tests run sequentially by default on the same cluster (with module-scoped fixtures properly cleaned up between modules), and parallel test runs use different machines/clusters. This means cluster-scoped resources (like ClusterUserDefinedNetwork or NodeNetworkConfigurationPolicy) can safely use the same names across different test modules without risk of collision.

Applied to files:

  • tests/network/general/test_bridge_marker.py
📚 Learning: 2025-08-28T12:34:56.341Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 1776
File: tests/network/bgp/conftest.py:62-87
Timestamp: 2025-08-28T12:34:56.341Z
Learning: The BGP test infrastructure in tests/network/bgp/ currently uses static IP assignment via EXTERNAL_FRR_STATIC_IPV4, but the long-term goal is to transition to DHCP for IP allocation. Additional validation of EXTERNAL_FRR_STATIC_IPV4 in individual fixtures is considered redundant since validation already occurs at the session level.

Applied to files:

  • tests/network/bgp/conftest.py
📚 Learning: 2025-08-14T10:28:22.958Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 1785
File: tests/virt/cluster/common_templates/utils.py:65-66
Timestamp: 2025-08-14T10:28:22.958Z
Learning: The restart_qemu_guest_agent_service function in tests/virt/cluster/common_templates/utils.py is only called for RHEL7 VMs, with OS version checks handled by the calling test code, not within the function itself. Guest agent functionality is verified by subsequent tests in the test class.

Applied to files:

  • utilities/unittests/test_ssp.py
🧬 Code graph analysis (23)
tests/network/upgrade/conftest.py (1)
tests/conftest.py (1)
  • admin_client (305-309)
tests/network/localnet/liblocalnet.py (1)
tests/network/libs/label_selector.py (1)
  • LabelSelector (5-6)
tests/infrastructure/sap/test_sap_hana_vm.py (2)
tests/conftest.py (3)
  • admin_client (305-309)
  • namespace (664-677)
  • sriov_namespace (1025-1026)
utilities/ssp.py (1)
  • create_custom_template_from_url (153-164)
tests/network/l2_bridge/conftest.py (1)
tests/conftest.py (1)
  • admin_client (305-309)
tests/install_upgrade_operators/must_gather/conftest.py (2)
tests/conftest.py (2)
  • admin_client (305-309)
  • namespace (664-677)
utilities/network.py (2)
  • network_nad (533-582)
  • network_device (973-1014)
tests/virt/node/migration_and_maintenance/test_dedicated_live_migration_network.py (2)
tests/conftest.py (2)
  • admin_client (305-309)
  • namespace (664-677)
tests/virt/node/migration_and_maintenance/utils.py (1)
  • MACVLANNetworkAttachmentDefinition (20-45)
tests/network/l2_bridge/utils.py (1)
tests/network/user_defined_network/test_user_defined_network.py (1)
  • client (86-93)
utilities/ssp.py (2)
tests/conftest.py (1)
  • namespace (664-677)
tests/network/user_defined_network/test_user_defined_network.py (1)
  • client (86-93)
tests/network/bond/test_l2_bridge_over_bond.py (2)
tests/conftest.py (2)
  • admin_client (305-309)
  • namespace (664-677)
utilities/network.py (1)
  • network_nad (533-582)
tests/network/nmstate/conftest.py (1)
tests/conftest.py (1)
  • admin_client (305-309)
tests/conftest.py (2)
utilities/network.py (5)
  • EthernetNetworkConfigurationPolicy (585-643)
  • create_sriov_node_policy (1077-1099)
  • MacPool (653-696)
  • network_device (973-1014)
  • network_nad (533-582)
utilities/infra.py (1)
  • get_node_selector_dict (1149-1150)
tests/network/libs/cluster_user_defined_network.py (2)
tests/network/libs/label_selector.py (1)
  • LabelSelector (5-6)
tests/network/libs/apimachinery.py (1)
  • dict_normalization_for_dataclass (4-6)
tests/network/localnet/conftest.py (4)
tests/conftest.py (1)
  • admin_client (305-309)
tests/network/libs/nodenetworkconfigurationpolicy.py (2)
  • NodeNetworkConfigurationPolicy (106-218)
  • wait_for_status_success (157-179)
tests/network/libs/cluster_user_defined_network.py (2)
  • wait_for_status_success (109-114)
  • ClusterUserDefinedNetwork (69-114)
tests/network/localnet/liblocalnet.py (1)
  • localnet_cudn (135-183)
tests/network/dry_run/test_dry_run_kubemacpool.py (2)
tests/conftest.py (2)
  • admin_client (305-309)
  • namespace (664-677)
utilities/network.py (2)
  • network_device (973-1014)
  • network_nad (533-582)
tests/network/jumbo_frame/conftest.py (2)
tests/conftest.py (2)
  • admin_client (305-309)
  • namespace (664-677)
utilities/network.py (2)
  • network_nad (533-582)
  • network_device (973-1014)
tests/network/conftest.py (3)
tests/conftest.py (1)
  • admin_client (305-309)
tests/network/user_defined_network/test_user_defined_network.py (1)
  • client (86-93)
tests/network/libs/cluster_user_defined_network.py (1)
  • Network (59-66)
tests/network/l2_bridge/test_ovs_bridge.py (2)
tests/conftest.py (2)
  • admin_client (305-309)
  • namespace (664-677)
utilities/network.py (1)
  • network_nad (533-582)
utilities/network.py (1)
tests/network/user_defined_network/test_user_defined_network.py (1)
  • client (86-93)
tests/network/kubemacpool/conftest.py (1)
tests/conftest.py (3)
  • admin_client (305-309)
  • mac_pool (1093-1098)
  • kmp_enabled_ns (1502-1505)
tests/network/general/test_bridge_marker.py (2)
utilities/network.py (2)
  • network_nad (533-582)
  • network_device (973-1014)
utilities/infra.py (1)
  • get_node_selector_dict (1149-1150)
tests/network/bgp/conftest.py (3)
tests/conftest.py (1)
  • admin_client (305-309)
tests/network/libs/nodenetworkconfigurationpolicy.py (1)
  • NodeNetworkConfigurationPolicy (106-218)
tests/network/libs/cluster_user_defined_network.py (1)
  • ClusterUserDefinedNetwork (69-114)
tests/network/migration/test_migration.py (2)
tests/conftest.py (2)
  • admin_client (305-309)
  • namespace (664-677)
utilities/network.py (1)
  • network_nad (533-582)
utilities/unittests/test_ssp.py (1)
utilities/ssp.py (1)
  • create_custom_template_from_url (153-164)
🪛 Ruff (0.14.7)
tests/conftest.py

1079-1079: Unused function argument: workers_utility_pods

(ARG001)

tests/network/localnet/conftest.py

111-111: Unused function argument: namespace_localnet_1

(ARG001)

tests/network/bgp/conftest.py

141-141: Unused function argument: namespace_cudn

(ARG001)

tests/network/kubemacpool/test_kubemacpool.py

131-131: Unused function argument: kmp_down

(ARG001)

tests/network/migration/test_migration.py

101-101: Unused function argument: bridge_worker_2

(ARG001)

tests/network/service_mesh/conftest.py

223-223: Unused function argument: httpbin_service_account_service_mesh

(ARG001)

utilities/unittests/test_ssp.py

355-355: Probable insecure usage of temporary file or directory: "/tmp"

(S108)


362-362: Probable insecure usage of temporary file or directory: "/tmp/custom-template"

(S108)


365-365: Probable insecure usage of temporary file or directory: "/tmp/custom-template"

(S108)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build-container
  • GitHub Check: tox
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants