fix(cd): keep ui changes on controlled profile
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 16s
CD Pipeline / build-and-deploy (push) Successful in 9m11s
CD Pipeline / post-deploy-checks (push) Successful in 1m6s
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 16s
CD Pipeline / build-and-deploy (push) Successful in 9m11s
CD Pipeline / post-deploy-checks (push) Successful in 1m6s
This commit is contained in:
30
ops/runner/test_cd_controlled_runtime_profile.py
Normal file
30
ops/runner/test_cd_controlled_runtime_profile.py
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
CD_WORKFLOW = ROOT / ".gitea" / "workflows" / "cd.yaml"
|
||||
|
||||
|
||||
def _workflow_text() -> str:
|
||||
return CD_WORKFLOW.read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_web_changes_stay_on_controlled_runtime_profile() -> None:
|
||||
text = _workflow_text()
|
||||
assert "apps/web/*)" in text
|
||||
assert "UI-only changes are verified by the" in text
|
||||
|
||||
|
||||
def test_controlled_runtime_skips_b5_before_docker_socket_use() -> None:
|
||||
text = _workflow_text()
|
||||
b5_start = text.index("- name: Integration Tests (B5")
|
||||
docker_socket = text.index("-v /var/run/docker.sock:/var/run/docker.sock", b5_start)
|
||||
controlled_gate = text.index(
|
||||
'if [ "${AWOOOI_CD_TEST_PROFILE:-full}" = "controlled-runtime" ]; then',
|
||||
b5_start,
|
||||
)
|
||||
exit_zero = text.index("exit 0", controlled_gate)
|
||||
assert controlled_gate < exit_zero < docker_socket
|
||||
Reference in New Issue
Block a user