Skip to content

Commit f6afacb

Browse files
authored
add separate config to skip v5 tests (#6493)
1 parent 217504b commit f6afacb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/conftest.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,16 @@ def pytest_collection_modifyitems(config, items) -> None:
169169
for item in items:
170170
if "skip_for_loadbalancer" in item.keywords:
171171
item.add_marker(skip_for_loadbalancer)
172-
if ("-nap" or "-nap-v5") not in config.getoption("--image"):
173-
appprotect = pytest.mark.skip(reason="Skip AppProtect test in non-AP image")
172+
if "-nap" not in config.getoption("--image"):
173+
appprotect = pytest.mark.skip(reason="Skip AppProtect WAF v4 test in non-AP WAF v4 image")
174174
for item in items:
175-
if ("appprotect" or "appprotect_waf_v5") in item.keywords:
175+
if "appprotect" in item.keywords:
176176
item.add_marker(appprotect)
177+
if "-nap-v5" not in config.getoption("--image"):
178+
appprotect_v5 = pytest.mark.skip(reason="Skip AppProtect WAF v5 test in non-AP WAF v5 image")
179+
for item in items:
180+
if "appprotect_waf_v5" in item.keywords:
181+
item.add_marker(appprotect_v5)
177182
if "-dos" not in config.getoption("--image"):
178183
dos = pytest.mark.skip(reason="Skip DOS test in non-DOS image")
179184
for item in items:

0 commit comments

Comments
 (0)