Skip to content

Commit

Permalink
make markers strict, and add project.toml to local python tests, (#5911)
Browse files Browse the repository at this point in the history
add project.toml to local python tests, make markers strict
  • Loading branch information
Jim Ryan authored Jul 2, 2024
1 parent 221bb86 commit 0e9ac15
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
36 changes: 35 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -31,28 +32,61 @@ 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",
"policies_ac",
"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",
"vs_grpc",
"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",
Expand Down
1 change: 1 addition & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/test_virtual_server_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0e9ac15

Please sign in to comment.