From d8a27173f07ccfea58e956eaebb124ef64365eee Mon Sep 17 00:00:00 2001 From: Jim Ryan Date: Tue, 2 Jul 2024 09:27:00 +0100 Subject: [PATCH] add project.toml to local python tests, make markers strict --- pyproject.toml | 36 ++++++++++++++++++- tests/Makefile | 1 + ...v_s_route_weight_changes_dynamic_reload.py | 2 +- ...ight_changes_dynamic_reload_many_splits.py | 2 +- tests/suite/test_virtual_server_grpc.py | 2 +- ...al_server_weight_changes_without_reload.py | 2 +- 6 files changed, 40 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2888295493..a47e8366ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,9 +20,10 @@ pythonpath = [ "tests/suite/fixtures", "tests/suite/utils", ] -addopts = "--tb=native -ra --disable-warnings -x -l --profile -v" +addopts = "--tb=native -ra --disable-warnings -x -l --profile -v --strict-markers" log_cli = true markers =[ + "annotations", "appprotect", "appprotect_integration", "appprotect_waf_policies", @@ -31,9 +32,15 @@ markers =[ "appprotect_waf_policies_grpc", "appprotect_watch", "appprotect_batch", + "basic_auth", + "batch_start", + "create", + "delete", "dos", "dos_learning", + "hsts", "ingresses", + "multi_ns", "policies", "policies_rl", "policies_jwt", @@ -41,9 +48,14 @@ markers =[ "policies_mtls", "rewrite", "skip_for_nginx_oss", + "skip_for_loadbalancer", "smoke", + "startup", "ts", + "upgrade", "vs", + "vs_api", + "vs_backup", "vs_ipv6", "vs_rewrite", "vs_responses", @@ -51,8 +63,30 @@ markers =[ "vs_redirects", "vs_externaldns", "vs_externalname", + "vs_canary", "vs_certmanager", + "vs_config_map", + "vs_grpc", + "vs_upstream", + "vs_use_cluster_ip", "vsr", + "vsr_api", + "vsr_basic", + "vsr_canned", + "vsr_canary", + "vsr_error_pages", + "vsr_external_name", + "vsr_grpc", + "vsr_redirects", + "vsr_regexes", + "vsr_rewrite", + "vsr_routing", + "vsr_secrets", + "vsr_splits", + "vsr_status", + "vsr_upstream", + "watch_namespace", + "wildcard_tls", ] testpaths = [ "tests", diff --git a/tests/Makefile b/tests/Makefile index 6e24864055..fb7ef4e605 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -57,6 +57,7 @@ run-tests-in-kind: ## Run tests in Kind -v $(ROOT_DIR)/tests:/workspace/tests \ -v $(ROOT_DIR)/deployments:/workspace/deployments \ -v $(ROOT_DIR)/config:/workspace/config \ + -v $(ROOT_DIR)/pyproject.toml:/workspace/pyproject.toml \ $(TEST_PREFIX):$(TEST_TAG) \ --context=kind-$(strip $(K8S_CLUSTER_NAME)) \ --image=$(BUILD_IMAGE) --image-pull-policy=$(PULL_POLICY) \ diff --git a/tests/suite/test_v_s_route_weight_changes_dynamic_reload.py b/tests/suite/test_v_s_route_weight_changes_dynamic_reload.py index c31efb0fc3..bd27a53607 100644 --- a/tests/suite/test_v_s_route_weight_changes_dynamic_reload.py +++ b/tests/suite/test_v_s_route_weight_changes_dynamic_reload.py @@ -93,7 +93,7 @@ def fin(): @pytest.mark.vsr @pytest.mark.vsr_splits -@pytest.mark.smok +@pytest.mark.smoke @pytest.mark.skip_for_nginx_oss @pytest.mark.parametrize( "crd_ingress_controller,vsr_weight_changes_dynamic_reload_setup, expect_reload", diff --git a/tests/suite/test_v_s_route_weight_changes_dynamic_reload_many_splits.py b/tests/suite/test_v_s_route_weight_changes_dynamic_reload_many_splits.py index a0fd285570..ec768d7ffd 100644 --- a/tests/suite/test_v_s_route_weight_changes_dynamic_reload_many_splits.py +++ b/tests/suite/test_v_s_route_weight_changes_dynamic_reload_many_splits.py @@ -115,7 +115,7 @@ def fin(): @pytest.mark.vsr @pytest.mark.vsr_splits -@pytest.mark.smok +@pytest.mark.smoke @pytest.mark.skip_for_nginx_oss @pytest.mark.parametrize( "crd_ingress_controller,vsr_weight_changes_dynamic_reload_many_splits_setup", diff --git a/tests/suite/test_virtual_server_grpc.py b/tests/suite/test_virtual_server_grpc.py index 4f879db770..657a3f7cbf 100644 --- a/tests/suite/test_virtual_server_grpc.py +++ b/tests/suite/test_virtual_server_grpc.py @@ -266,7 +266,7 @@ def test_config_after_enable_tls( @pytest.mark.vs -@pytest.mark.vs_gprc +@pytest.mark.vs_grpc @pytest.mark.smoke @pytest.mark.skip_for_nginx_oss @pytest.mark.parametrize( diff --git a/tests/suite/test_virtual_server_weight_changes_without_reload.py b/tests/suite/test_virtual_server_weight_changes_without_reload.py index 5cab204b42..f39ffa747c 100644 --- a/tests/suite/test_virtual_server_weight_changes_without_reload.py +++ b/tests/suite/test_virtual_server_weight_changes_without_reload.py @@ -7,7 +7,7 @@ @pytest.mark.vs -@pytest.mark.smok +@pytest.mark.smoke @pytest.mark.skip_for_nginx_oss @pytest.mark.parametrize( "crd_ingress_controller, virtual_server_setup, expect_reload",