Skip to content

Commit

Permalink
add separate config to skip v5 tests (#6493)
Browse files Browse the repository at this point in the history
  • Loading branch information
vepatel authored Sep 24, 2024
1 parent 217504b commit f6afacb
Showing 1 changed file with 8 additions and 3 deletions.
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

0 comments on commit f6afacb

Please sign in to comment.