fix: exclude infrastructure probes from API throttling
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 3m28s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 3m23s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 1m49s
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 3m28s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 3m23s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 1m49s
This commit is contained in:
26
tests/test_deployment_boundaries.py
Normal file
26
tests/test_deployment_boundaries.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
WORKFLOWS = Path(__file__).resolve().parents[1] / ".gitea" / "workflows"
|
||||
|
||||
|
||||
def test_workflows_do_not_deploy_to_center():
|
||||
assert not (WORKFLOWS / "deploy-customer-main.yml").exists()
|
||||
for path in WORKFLOWS.glob("*.y*ml"):
|
||||
workflow = yaml.safe_load(path.read_text())
|
||||
assert "deploy_customer_main" not in workflow["jobs"]
|
||||
content = path.read_text()
|
||||
for forbidden in ("CUSTOMER_DEPLOY_", "10.0.10.174", "/ecos/release-service"):
|
||||
assert forbidden not in content, (path.name, forbidden)
|
||||
|
||||
|
||||
def test_ci_does_not_prune_shared_runner_resources():
|
||||
for path in WORKFLOWS.glob("*.y*ml"):
|
||||
content = path.read_text()
|
||||
for command in (
|
||||
"docker system prune",
|
||||
"docker builder prune",
|
||||
"docker buildx prune",
|
||||
):
|
||||
assert command not in content, (path.name, command)
|
||||
Reference in New Issue
Block a user