cryptpad: add test for nixos module

DavHau df0f76b3 6e59bc79

Changed files
+22
nixos
pkgs
servers
web-apps
cryptpad
+1
nixos/tests/all-tests.nix
···
cri-o = handleTestOn ["x86_64-linux"] ./cri-o.nix {};
custom-ca = handleTest ./custom-ca.nix {};
croc = handleTest ./croc.nix {};
+
cryptpad = handleTest ./cryptpad.nix {};
deluge = handleTest ./deluge.nix {};
dendrite = handleTest ./dendrite.nix {};
dhparams = handleTest ./dhparams.nix {};
+18
nixos/tests/cryptpad.nix
···
+
import ./make-test-python.nix ({ lib, ... }:
+
+
with lib;
+
+
{
+
name = "cryptpad";
+
meta.maintainers = with maintainers; [ davhau ];
+
+
nodes.machine =
+
{ pkgs, ... }:
+
{ services.cryptpad.enable = true; };
+
+
testScript = ''
+
machine.wait_for_unit("cryptpad.service")
+
machine.wait_for_open_port("3000")
+
machine.succeed("curl -L --fail http://localhost:3000/sheet")
+
'';
+
})
+3
pkgs/servers/web-apps/cryptpad/default.nix
···
EOF
chmod +x $out/bin/cryptpad
'';
+
+
meta.maintainers = with lib.maintainers; [ davhau ];
+
};
in
combined