Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vs markers #4793

Merged
merged 17 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 10 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
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,23 @@ jobs:
[{\"image\": \"debian\", \"marker\": \"ingresses\"}, \
{\"image\": \"alpine\", \"marker\":\"vsr\"}, \
{\"image\": \"alpine\", \"marker\":\"policies\"}, \
{\"image\": \"debian\", \"marker\": \"vs\"}, \
{\"image\": \"debian\", \"marker\": \"'vs and not vs_ipv6 and not vs_rewrite and not vs_responses and not vs_grpc and not vs_redirects and not vs_externalname and not vs_externaldns and not vs_certmanager'\"}, \
{\"image\": \"debian\", \"marker\": \"'vs_ipv6 or vs_rewrite or vs_responses or vs_grpc or vs_redirects or vs_externalname or vs_externaldns'\"}, \
{\"image\": \"debian\", \"marker\": \"'vs_certmanager'\"}, \
{\"image\": \"ubi\", \"marker\": \"ts\"}, \
{\"image\": \"debian-plus\", \"marker\": \"vs\"}, \
{\"image\": \"debian-plus\", \"marker\": \"'vs and not vs_ipv6 and not vs_rewrite and not vs_responses and not vs_grpc and not vs_redirects and not vs_externalname and not vs_externaldns and not vs_certmanager'\"}, \
{\"image\": \"debian-plus\", \"marker\": \"'vs_ipv6 or vs_rewrite or vs_responses or vs_grpc or vs_redirects or vs_externalname or vs_externaldns'\"}, \
{\"image\": \"debian-plus\", \"marker\": \"vs_certmanager\"}, \
{\"image\": \"debian-plus\", \"marker\": \"ts\"}, \
{\"image\": \"alpine-plus\", \"marker\":\"ingresses\"}, \
{\"image\": \"alpine-plus\", \"marker\": \"vsr\"}, \
{\"image\": \"ubi-plus\", \"marker\": \"policies\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"appprotect_integration\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"appprotect_waf_policies_allow\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"'appprotect_waf_policies and not appprotect_waf_policies_allow'\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"appprotect_waf_policies_grpc\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"'appprotect_watch or appprotect_batch'\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"dos\"}], \
{\"image\": \"debian-plus-nap\", \"marker\": \"'appprotect_watch or appprotect_batch or appprotect_integration'\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"'dos and not dos_learning'\"}, \
{\"image\": \"debian-plus-nap\", \"marker\": \"dos_learning\"}], \
\"k8s\": [\"${{ needs.checks.outputs.k8s_latest }}\"]}" >> $GITHUB_OUTPUT
else
echo "matrix={\"k8s\": [\"1.22.17\", \"1.23.17\", \"1.24.15\", \"1.25.11\", \"1.26.6\", \"1.27.3\", \"${{ needs.checks.outputs.k8s_latest }}\"], \
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,22 @@ markers =[
"appprotect_watch",
"appprotect_batch",
"dos",
"dos_learning",
"ingresses",
"policies",
"rewrite",
"skip_for_nginx_oss",
"smoke",
"ts",
"vs",
"vs_ipv6",
"vs_rewrite",
"vs_responses",
"vs_grpc",
"vs_redirects",
"vs_externaldns",
"vs_externalname",
"vs_certmanager",
"vsr",
]
testpaths = [
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_disable_ipv6.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@pytest.mark.vs
@pytest.mark.ts
@pytest.mark.vs_ipv6
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup, transport_server_setup",
[
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_dos.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ def test_dos_sec_logs_on(
assert f'vs_name="{test_namespace}/dos-protected/name"' in log_contents
assert "bad_actor" in log_contents

@pytest.mark.dos_learning
def test_dos_under_attack_with_learning(
self, kube_apis, ingress_controller_prerequisites, crd_ingress_controller_with_dos, dos_setup, test_namespace
):
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_rewrites.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def fin():
@pytest.mark.parametrize("crd_ingress_controller", [({"type": "complete"})], indirect=True)
class TestRewrites:
@pytest.mark.vs
@pytest.mark.vs_rewrite
@pytest.mark.parametrize("path,args,cookies,expected", test_data)
def test_vs_rewrite(self, vs_rewrites_setup, path, args, cookies, expected):
"""
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_virtual_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@


@pytest.mark.vs
@pytest.mark.vs_responses
@pytest.mark.smoke
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_virtual_server_canned_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


@pytest.mark.vs
@pytest.mark.vs_responses
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
[
Expand Down
3 changes: 3 additions & 0 deletions tests/suite/test_virtual_server_certmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


@pytest.mark.vs
@pytest.mark.vs_certmanager
@pytest.mark.smoke
@pytest.mark.parametrize(
"crd_ingress_controller, create_certmanager, virtual_server_setup",
Expand Down Expand Up @@ -42,6 +43,7 @@ def test_responses_after_setup(self, kube_apis, crd_ingress_controller, create_c


@pytest.mark.vs
@pytest.mark.vs_certmanager
@pytest.mark.smoke
@pytest.mark.parametrize(
"crd_ingress_controller, create_certmanager, virtual_server_setup",
Expand Down Expand Up @@ -102,6 +104,7 @@ def test_virtual_server_no_cm(self, kube_apis, crd_ingress_controller, create_ce


@pytest.mark.vs
@pytest.mark.vs_certmanager
@pytest.mark.smoke
@pytest.mark.parametrize(
"crd_ingress_controller, create_certmanager, virtual_server_setup",
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_virtual_server_external_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def fin():


@pytest.mark.vs
@pytest.mark.vs_externalname
@pytest.mark.skip_for_nginx_oss
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_virtual_server_externaldns.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


@pytest.mark.vs
@pytest.mark.vs_externaldns
@pytest.mark.smoke
@pytest.mark.parametrize(
"crd_ingress_controller_with_ed, create_externaldns, virtual_server_setup",
Expand Down
2 changes: 2 additions & 0 deletions tests/suite/test_virtual_server_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def fin():


@pytest.mark.vs
@pytest.mark.vs_grpc
@pytest.mark.smoke
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
Expand Down Expand Up @@ -265,6 +266,7 @@ def test_config_after_enable_tls(


@pytest.mark.vs
@pytest.mark.vs_gprc
@pytest.mark.smoke
@pytest.mark.skip_for_nginx_oss
@pytest.mark.parametrize(
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_virtual_server_mixed_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def fin():


@pytest.mark.vs
@pytest.mark.vs_grpc
@pytest.mark.smoke
@pytest.mark.flaky(max_runs=3)
@pytest.mark.parametrize(
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_virtual_server_redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


@pytest.mark.vs
@pytest.mark.vs_redirects
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
[
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_virtual_server_tls_redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


@pytest.mark.vs
@pytest.mark.vs_redirects
@pytest.mark.parametrize(
"crd_ingress_controller, virtual_server_setup",
[
Expand Down
1 change: 1 addition & 0 deletions tests/suite/test_watch_namespace_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def test_response_codes(self, kube_apis, ingress_controller, backend_setup, expe


@pytest.mark.vs
@pytest.mark.vs_responses
@pytest.mark.parametrize(
"crd_ingress_controller, expected_responses",
[
Expand Down
Loading