Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
22 lines
645 B
Nix
22 lines
645 B
Nix
import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
|
name = "lighttpd";
|
|
meta.maintainers = with lib.maintainers; [ bjornfor ];
|
|
|
|
nodes = {
|
|
server = {
|
|
services.lighttpd.enable = true;
|
|
services.lighttpd.document-root = pkgs.runCommand "document-root" {} ''
|
|
mkdir -p "$out"
|
|
echo "hello nixos test" > "$out/file.txt"
|
|
'';
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
server.wait_for_unit("lighttpd.service")
|
|
res = server.succeed("curl --fail http://localhost/file.txt")
|
|
assert "hello nixos test" in res, f"bad server response: '{res}'"
|
|
server.succeed("systemctl reload lighttpd")
|
|
'';
|
|
})
|