Skip to content

Commit 95f885c

Browse files
[CRM][DASH] Add VS tests from DASH resources.
Signed-off-by: Oleksandr Ivantsiv <[email protected]>
1 parent 359c056 commit 95f885c

File tree

2 files changed

+464
-2
lines changed

2 files changed

+464
-2
lines changed

tests/conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,8 +1755,6 @@ def manage_dvs(request) -> str:
17551755
buffer_model = request.config.getoption("--buffer_model")
17561756
force_recreate = request.config.getoption("--force-recreate-dvs")
17571757
graceful_stop = request.config.getoption("--graceful-stop")
1758-
global NUM_PORTS
1759-
NUM_PORTS = request.config.getoption("--num-ports")
17601758

17611759
dvs = None
17621760
curr_dvs_env = [] # lgtm[py/unused-local-variable]
@@ -1819,6 +1817,11 @@ def update_dvs(log_path, new_dvs_env=[]):
18191817
@pytest.fixture(scope="module")
18201818
def dvs(request, manage_dvs) -> DockerVirtualSwitch:
18211819
dvs_env = getattr(request.module, "DVS_ENV", [])
1820+
global NUM_PORTS
1821+
if getattr(request.module, "NUM_PORTS", None):
1822+
NUM_PORTS = getattr(request.module, "NUM_PORTS")
1823+
else:
1824+
NUM_PORTS = request.config.getoption("--num-ports")
18221825
name = request.config.getoption("--dvsname")
18231826
log_path = name if name else request.module.__name__
18241827

0 commit comments

Comments
 (0)