From 3aa8b57abfcf9056afaa946cba7a6cc05a23c1c7 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Thu, 27 Apr 2023 10:47:50 +0000 Subject: [PATCH] Don't run some of the stateless SG tests in ovn migration workflow This commit adds new pytest mark "skip_during_ovn_migration" to mark some tests to be always skipped during migration from ML2/OVS to ML2/OVN and marks as such tests from the StatelessSecurityGroupInstanceTest class. The reason why those tests shouldn't be run during the ovs to ovn migration is that we are skipping them in ML2/OVS env so resources required by those tests aren't created and later, when env is ML2/OVN already we can't really verify them as we don't have required resources created. This patch modifies also ovn_migration tox env so it will run all neutron scenario tests EXCEPT tests marked with this new pytest mark as "skip_during_ovn_migration". Change-Id: Iaa1e8b0d325ea690c6d6cb89e06006e7bbed9237 --- pytest.ini | 1 + tobiko/tests/scenario/neutron/test_security_groups.py | 2 ++ tox.ini | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 41a4065a5..965a29277 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,6 +4,7 @@ render_collapsed = True markers = ovn_migration: test cases for testing OVN migration minimal: most relevant and lightweight test cases + skip_during_ovn_migration: test cases which shouldn't be run in the OVS to OVN migration jobs # rp_uuid = 887ab577-b89e-4b12-9d8f-03f7a0a5b14a diff --git a/tobiko/tests/scenario/neutron/test_security_groups.py b/tobiko/tests/scenario/neutron/test_security_groups.py index 1baffa533..8141a0fbf 100644 --- a/tobiko/tests/scenario/neutron/test_security_groups.py +++ b/tobiko/tests/scenario/neutron/test_security_groups.py @@ -18,6 +18,7 @@ import json import typing from oslo_log import log +import pytest import testtools import tobiko @@ -285,6 +286,7 @@ class CirrosServerWithStatelessSecurityGroupFixture( return [self.security_groups_stack.security_group_id] +@pytest.mark.skip_during_ovn_migration @neutron.skip_if_missing_networking_extensions('stateful-security-group') class StatelessSecurityGroupInstanceTest(BaseSecurityGroupTest): diff --git a/tox.ini b/tox.ini index 080ec87fd..84a2821f3 100644 --- a/tox.ini +++ b/tox.ini @@ -219,8 +219,8 @@ envdir = {[integration]envdir} passenv = {[integration]passenv} setenv = {[testenv:scenario]setenv} - RUN_TESTS_EXTRA_ARGS = -m ovn_migration {env:OS_TEST_PATH} - + OS_TEST_PATH = {toxinidir}/tobiko/tests/scenario + RUN_TESTS_EXTRA_ARGS = -m "not skip_during_ovn_migration" {env:OS_TEST_PATH} [testenv:nova]