Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,16 @@ def pytest_collection_modifyitems(config, items) -> None:
for item in items:
if "skip_for_loadbalancer" in item.keywords:
item.add_marker(skip_for_loadbalancer)
if ("-nap" or "-nap-v5") not in config.getoption("--image"):
appprotect = pytest.mark.skip(reason="Skip AppProtect test in non-AP image")
if "-nap" not in config.getoption("--image"):
appprotect = pytest.mark.skip(reason="Skip AppProtect WAF v4 test in non-AP WAF v4 image")
for item in items:
if ("appprotect" or "appprotect_waf_v5") in item.keywords:
if "appprotect" in item.keywords:
item.add_marker(appprotect)
if "-nap-v5" not in config.getoption("--image"):
appprotect_v5 = pytest.mark.skip(reason="Skip AppProtect WAF v5 test in non-AP WAF v5 image")
for item in items:
if "appprotect_waf_v5" in item.keywords:
item.add_marker(appprotect_v5)
if "-dos" not in config.getoption("--image"):
dos = pytest.mark.skip(reason="Skip DOS test in non-DOS image")
for item in items:
Expand Down
Loading