[repo] NixOS and docs: Caddy admin socket for changes under Caddy, polkit start/stop only, edge never stops restarting, openssl in the VM tests, beside-Caddy without secrets in argv, pinned Ianitor rev, X-Served-By trial marker
This commit is contained in:
@@ -51,7 +51,7 @@ let
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.python3}/bin/python3 -m http.server 8000 --bind 127.0.0.1 --directory /etc";
|
||||
};
|
||||
environment.systemPackages = [ pkgs.curl pkgs.jq ];
|
||||
environment.systemPackages = [ pkgs.curl pkgs.jq pkgs.openssl ];
|
||||
};
|
||||
|
||||
# Python helpers shared by the test scripts.
|
||||
@@ -151,6 +151,12 @@ in
|
||||
assert server.succeed("cat /var/lib/ianitor/engine").strip() == "caddy"
|
||||
server.wait_until_succeeds("curl -s -o /dev/null -w '%{http_code}' --cacert ${testRoot}/domi-root.crt --resolve app.test:443:127.0.0.1 https://app.test/ | grep -q 200")
|
||||
|
||||
# Changes keep working while Caddy serves: loaded through its admin socket and watched.
|
||||
r = api(server, t, "POST", "/hosts", {"host": {
|
||||
"hostname": "two.test", "upstreams": ["http://127.0.0.1:8000"], "tls": "domi", "auth": "none"}})
|
||||
assert wait_apply(server, t, r["apply"]["id"])["state"] == "kept"
|
||||
server.succeed("curl -s -o /dev/null -w '%{http_code}' --cacert ${testRoot}/domi-root.crt --resolve two.test:443:127.0.0.1 https://two.test/ | grep -q 200")
|
||||
|
||||
api(server, t, "POST", "/engine", {"target": "pingora"})
|
||||
server.wait_until_succeeds(
|
||||
f"curl -s -H 'Authorization: Bearer {t}' http://127.0.0.1:7878/api/v1/engine | jq -e '.running == \"pingora\" and .state == \"running\"'"
|
||||
|
||||
Reference in New Issue
Block a user