summary refs log tree commit diff
path: root/nixos/tests/shiori.nix
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2019-09-22 17:54:16 +0200
committerMinijackson <minijackson@riseup.net>2019-09-22 18:48:07 +0200
commit367cd2c7f8c7801f94ad4750f3f3389526643fcc (patch)
treed2b95ea6e9d35052c8f99ac42e09e064f672e037 /nixos/tests/shiori.nix
parent7ebb3f58189fe303f8a1a54476a398dd1f9fa655 (diff)
downloadnixpkgs-367cd2c7f8c7801f94ad4750f3f3389526643fcc.tar
nixpkgs-367cd2c7f8c7801f94ad4750f3f3389526643fcc.tar.gz
nixpkgs-367cd2c7f8c7801f94ad4750f3f3389526643fcc.tar.bz2
nixpkgs-367cd2c7f8c7801f94ad4750f3f3389526643fcc.tar.lz
nixpkgs-367cd2c7f8c7801f94ad4750f3f3389526643fcc.tar.xz
nixpkgs-367cd2c7f8c7801f94ad4750f3f3389526643fcc.tar.zst
nixpkgs-367cd2c7f8c7801f94ad4750f3f3389526643fcc.zip
nixos/shiori: init with test
Diffstat (limited to 'nixos/tests/shiori.nix')
-rw-r--r--nixos/tests/shiori.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/nixos/tests/shiori.nix b/nixos/tests/shiori.nix
new file mode 100644
index 00000000000..0022a7220fe
--- /dev/null
+++ b/nixos/tests/shiori.nix
@@ -0,0 +1,17 @@
+import ./make-test.nix ({ lib, ...}:
+
+{
+  name = "shiori";
+  meta.maintainers = with lib.maintainers; [ minijackson ];
+
+  machine =
+    { ... }:
+    { services.shiori.enable = true; };
+
+  testScript = ''
+    $machine->waitForUnit('shiori.service');
+    $machine->waitForOpenPort('8080');
+    $machine->succeed("curl --fail http://localhost:8080/");
+    $machine->succeed("curl --fail --location http://localhost:8080/ | grep -qi shiori");
+  '';
+})