This commit is contained in:
2026-10-11 15:00:22 +07:00
parent 2b7b95fe2b
commit f25c48b57b
8 changed files with 222 additions and 6 deletions
+9
View File
@@ -181,6 +181,15 @@ with tempfile.TemporaryDirectory(prefix="venue-https-") as directory:
assert {(p["protocol"], str(p["published"])) for p in dns["ports"]} == {("udp", "53"), ("tcp", "53")}
assert all(p["host_ip"] == "127.0.0.1" for p in dns["ports"])
assert any(v["target"] == "/etc/coredns/Corefile" and v["read_only"] for v in dns["volumes"])
collector = https["services"]["cudy_collector"]
backend = https["services"]["evening_detective_server"]
assert set(collector["networks"]) == {"entrance"} and not collector.get("ports")
assert set(backend["networks"]) == {"default"}
assert "DATABASE_URL" not in collector["environment"] and "S3_PASSWORD" not in collector["environment"]
assert any(v["target"] == "/run/secrets/cudy" and v["read_only"] for v in collector["volumes"])
assert any(v["target"] == "/run/cudy" and v["read_only"] for v in backend["volumes"])
assert not any(v["target"] == "/run/secrets/cudy" for v in backend["volumes"])
assert collector["environment"]["CUDY_SNAPSHOT_FILE"] == server["CUDY_SNAPSHOT_FILE"]
print("PASS: Compose merge, HTTPS addresses, ports, read-only mounts and preserved data volumes")
suffix = uuid.uuid4().hex[:10]
network = "venue-https-test-" + suffix