about summary refs log tree commit diff
path: root/nixos/tests/cryptpad.nix
diff options
context:
space:
mode:
authorDavHau <hsngrmpf+github@gmail.com>2021-08-10 13:04:07 +0200
committerRaphael Megzari <raphael@megzari.com>2021-08-11 11:04:39 +0900
commitdf0f76b39ff419136f742e300eb7c07cc83bd54f (patch)
treecf1a0fbbcaad09c597c8cb07c3752ec1ea83a9e8 /nixos/tests/cryptpad.nix
parent6e59bc79696bc826fdbf6821c0e0eccad93703db (diff)
cryptpad: add test for nixos module
Diffstat (limited to 'nixos/tests/cryptpad.nix')
-rw-r--r--nixos/tests/cryptpad.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/tests/cryptpad.nix b/nixos/tests/cryptpad.nix
new file mode 100644
index 0000000000000..895f291abaca3
--- /dev/null
+++ b/nixos/tests/cryptpad.nix
@@ -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")
+  '';
+})