Files
awoooi/scripts/reboot-recovery/tests/test_signoz_188_upstream_bridge.py
Your Name 5a1c507671
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 1m44s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
fix(recovery): clear cold-start service blockers
2026-07-01 19:16:58 +08:00

32 lines
1.2 KiB
Python

from __future__ import annotations
from pathlib import Path
ROOT = Path(__file__).resolve().parents[3]
SCRIPT = ROOT / "scripts" / "reboot-recovery" / "signoz-188-upstream-bridge.sh"
def test_signoz_bridge_is_user_level_reversible_and_bounded() -> None:
text = SCRIPT.read_text(encoding="utf-8")
executable_text = "\n".join(
line for line in text.splitlines() if not line.lstrip().startswith("#")
)
assert "TARGET_HOST=\"${TARGET_HOST:-ollama@192.168.0.188}\"" in text
assert "LISTEN_HOST=\"${LISTEN_HOST:-127.0.0.1}\"" in text
assert "LISTEN_PORT=\"${LISTEN_PORT:-3301}\"" in text
assert "UPSTREAM_HOST=\"${UPSTREAM_HOST:-192.168.0.110}\"" in text
assert "UPSTREAM_PORT=\"${UPSTREAM_PORT:-8080}\"" in text
assert "-o ConnectionAttempts=1" in text
assert "-o ServerAliveInterval=5" in text
assert "-o ServerAliveCountMax=1" in text
assert "socat" in text
assert "@reboot" in text
assert "--rollback" in text
assert "SIGNOZ_BRIDGE_STATUS" in text
assert "systemctl " not in executable_text
assert "sudo " not in executable_text
assert "docker " not in executable_text
assert "nginx -s reload" not in executable_text