diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-12-07 12:01:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 12:01:24 +0000 |
commit | 860e5725bdfc7307b8257cbf9bf4a87dec978cc8 (patch) | |
tree | e410fc29c9dff2d52e1ee6a12f8394b0507bd96b /nixos/tests | |
parent | 32d842483f3773ec1cde181507bd77b405af046e (diff) | |
parent | 4a609ec5d195ed770a1b30fa49ba19a0947cd819 (diff) | |
download | nixlib-860e5725bdfc7307b8257cbf9bf4a87dec978cc8.tar nixlib-860e5725bdfc7307b8257cbf9bf4a87dec978cc8.tar.gz nixlib-860e5725bdfc7307b8257cbf9bf4a87dec978cc8.tar.bz2 nixlib-860e5725bdfc7307b8257cbf9bf4a87dec978cc8.tar.lz nixlib-860e5725bdfc7307b8257cbf9bf4a87dec978cc8.tar.xz nixlib-860e5725bdfc7307b8257cbf9bf4a87dec978cc8.tar.zst nixlib-860e5725bdfc7307b8257cbf9bf4a87dec978cc8.zip |
Merge master into staging-next
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/caddy.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/tests/caddy.nix b/nixos/tests/caddy.nix index 5a0d3539394b..41d8e57de468 100644 --- a/nixos/tests/caddy.nix +++ b/nixos/tests/caddy.nix @@ -48,11 +48,19 @@ import ./make-test-python.nix ({ pkgs, ... }: { }; }; }; + specialisation.explicit-config-file.configuration = { + services.caddy.configFile = pkgs.writeText "Caddyfile" '' + localhost:80 + + respond "hello world" + ''; + }; }; }; testScript = { nodes, ... }: let + explicitConfigFile = "${nodes.webserver.system.build.toplevel}/specialisation/explicit-config-file"; justReloadSystem = "${nodes.webserver.system.build.toplevel}/specialisation/config-reload"; multipleConfigs = "${nodes.webserver.system.build.toplevel}/specialisation/multiple-configs"; rfc42Config = "${nodes.webserver.system.build.toplevel}/specialisation/rfc42"; @@ -84,5 +92,12 @@ import ./make-test-python.nix ({ pkgs, ... }: { ) webserver.wait_for_open_port(80) webserver.succeed("curl http://localhost | grep hello") + + with subtest("explicit configFile"): + webserver.succeed( + "${explicitConfigFile}/bin/switch-to-configuration test >&2" + ) + webserver.wait_for_open_port(80) + webserver.succeed("curl http://localhost | grep hello") ''; }) |