cryptpad: add test for nixos module

This commit is contained in:
DavHau 2021-08-10 13:04:07 +02:00 committed by Raphael Megzari
parent 6e59bc7969
commit df0f76b39f
3 changed files with 22 additions and 0 deletions

View File

@ -94,6 +94,7 @@ in
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 Normal file
View File

@ -0,0 +1,18 @@
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")
'';
})

View File

@ -72,6 +72,9 @@ let
EOF
chmod +x $out/bin/cryptpad
'';
meta.maintainers = with lib.maintainers; [ davhau ];
};
in
combined