This commit is contained in:
2026-10-10 15:58:44 +07:00
parent 3efdb52c3c
commit e5191ebe50
9 changed files with 204 additions and 13 deletions
+8
View File
@@ -103,6 +103,7 @@ with tempfile.TemporaryDirectory(prefix="venue-https-") as directory:
assert prefix + " build --pull=false" in commands
assert commands.index(prefix + " build --pull=false") < commands.index(prefix + " up -d")
assert (prefix + " pull " in commands) == cold
assert (prefix + " pull dns" in commands) == cold
assert ("docker pull alpine:3.22" in commands) == cold
assert "make " not in commands and "npm " not in commands
else:
@@ -173,6 +174,13 @@ with tempfile.TemporaryDirectory(prefix="venue-https-") as directory:
assert len(configs) == 1 and configs[0]["source"].endswith("/nginx.https.conf") and configs[0]["read_only"]
assert any(v["target"] == "/etc/nginx/certificates" and v["read_only"] for v in https["services"]["proxy"]["volumes"])
assert https["networks"]["default"]["internal"] and https["volumes"] == http_config["volumes"]
dns = https["services"]["dns"]
assert dns["image"] == "coredns/coredns:1.14.7"
assert dns["environment"]["VENUE_DNS_IP"] == "127.0.0.1"
assert set(dns["networks"]) == {"entrance"}
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"])
print("PASS: Compose merge, HTTPS addresses, ports, read-only mounts and preserved data volumes")
suffix = uuid.uuid4().hex[:10]
network = "venue-https-test-" + suffix