Skip to content

Commit f9bc296

Browse files
authored
fix regression job (#6489)
1 parent 09d7eef commit f9bc296

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/regression.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ jobs:
231231
- name: Set image variables
232232
id: image_details
233233
run: |
234-
echo "name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic${{ contains(matrix.images.nap_modules, 'dos') && '-dos' || '' }}${{ contains(matrix.images.nap_modules, 'waf') && '-nap' || '' }}/nginx${{ contains(matrix.images.image, 'plus') && '-plus' || '' }}-ingress" >> $GITHUB_OUTPUT
234+
echo "name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic${{ contains(matrix.images.nap_modules, 'dos') && '-dos' || '' }}${{ contains(matrix.images.nap_modules, 'waf') && '-nap' || '' }}${{ contains(matrix.images.image, 'v5') && '-v5' || '' }}/nginx${{ contains(matrix.images.image, 'plus') && '-plus' || '' }}-ingress" >> $GITHUB_OUTPUT
235235
echo "tag=${{ needs.checks.outputs.stable_tag }}${{ contains(matrix.images.image, 'ubi') && '-ubi' || '' }}${{ contains(matrix.images.image, 'alpine') && '-alpine' || '' }}${{ contains(matrix.images.target, 'aws') && '-mktpl' || '' }}${{ contains(matrix.images.image, 'fips') && '-fips' || ''}}" >> $GITHUB_OUTPUT
236236
237237
- name: Authenticate to Google Cloud
@@ -260,6 +260,11 @@ jobs:
260260
run: |
261261
docker pull ${{ steps.image_details.outputs.name }}:${{ steps.image_details.outputs.tag }}
262262
263+
- name: Generate WAF v5 tgz from JSON
264+
run: |
265+
docker run --rm --user root -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}/tests/data/ap-waf-v5:/data gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/nap/waf-compiler:5.2.0 -p /data/wafv5.json -o /data/wafv5.tgz
266+
if: ${{ contains(matrix.images.image, 'nap-v5')}}
267+
263268
- name: Run Regression Tests
264269
id: regression-tests
265270
uses: ./.github/actions/smoke-tests

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ 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" not in config.getoption("--image"):
172+
if ("-nap" or "-nap-v5") not in config.getoption("--image"):
173173
appprotect = pytest.mark.skip(reason="Skip AppProtect test in non-AP image")
174174
for item in items:
175175
if "appprotect" in item.keywords:

tests/suite/test_app_protect_wafv5_integration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def waf_setup(kube_apis, test_namespace) -> None:
1818
wait_before_test()
1919

2020

21+
@pytest.mark.skip_for_nginx_oss
2122
@pytest.mark.appprotect_waf_v5
2223
@pytest.mark.parametrize(
2324
"crd_ingress_controller_with_waf_v5, virtual_server_setup",
@@ -86,6 +87,7 @@ def test_ap_waf_v5_policy_block_vs(
8687
assert "The requested URL was rejected. Please consult with your administrator." in response.text
8788

8889

90+
@pytest.mark.skip_for_nginx_oss
8991
@pytest.mark.appprotect_waf_v5
9092
@pytest.mark.parametrize(
9193
"crd_ingress_controller_with_waf_v5, v_s_route_setup",

0 commit comments

Comments
 (0)