mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
parent
569c914f0c
commit
8f0d4225d4
2 changed files with 21 additions and 23 deletions
|
@ -703,7 +703,7 @@ in
|
||||||
libvirtd = handleTest ./libvirtd.nix { };
|
libvirtd = handleTest ./libvirtd.nix { };
|
||||||
lidarr = handleTest ./lidarr.nix { };
|
lidarr = handleTest ./lidarr.nix { };
|
||||||
lightdm = handleTest ./lightdm.nix { };
|
lightdm = handleTest ./lightdm.nix { };
|
||||||
lighttpd = handleTest ./lighttpd.nix { };
|
lighttpd = runTest ./lighttpd.nix;
|
||||||
limesurvey = handleTest ./limesurvey.nix { };
|
limesurvey = handleTest ./limesurvey.nix { };
|
||||||
limine = import ./limine { inherit runTest; };
|
limine = import ./limine { inherit runTest; };
|
||||||
listmonk = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./listmonk.nix { };
|
listmonk = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./listmonk.nix { };
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
import ./make-test-python.nix (
|
{ lib, pkgs, ... }:
|
||||||
{ lib, pkgs, ... }:
|
{
|
||||||
{
|
name = "lighttpd";
|
||||||
name = "lighttpd";
|
meta.maintainers = with lib.maintainers; [ bjornfor ];
|
||||||
meta.maintainers = with lib.maintainers; [ bjornfor ];
|
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
server = {
|
server = {
|
||||||
services.lighttpd.enable = true;
|
services.lighttpd.enable = true;
|
||||||
services.lighttpd.document-root = pkgs.runCommand "document-root" { } ''
|
services.lighttpd.document-root = pkgs.runCommand "document-root" { } ''
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
echo "hello nixos test" > "$out/file.txt"
|
echo "hello nixos test" > "$out/file.txt"
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
start_all()
|
start_all()
|
||||||
server.wait_for_unit("lighttpd.service")
|
server.wait_for_unit("lighttpd.service")
|
||||||
res = server.succeed("curl --fail http://localhost/file.txt")
|
res = server.succeed("curl --fail http://localhost/file.txt")
|
||||||
assert "hello nixos test" in res, f"bad server response: '{res}'"
|
assert "hello nixos test" in res, f"bad server response: '{res}'"
|
||||||
server.succeed("systemctl reload lighttpd")
|
server.succeed("systemctl reload lighttpd")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue