about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/isso.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/isso.nix')
-rw-r--r--nixpkgs/nixos/tests/isso.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/isso.nix b/nixpkgs/nixos/tests/isso.nix
new file mode 100644
index 000000000000..4ec8b5ec3593
--- /dev/null
+++ b/nixpkgs/nixos/tests/isso.nix
@@ -0,0 +1,30 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+  name = "isso";
+  meta = with pkgs.lib.maintainers; {
+    maintainers = [ ];
+  };
+
+  nodes.machine = { config, pkgs, ... }: {
+    services.isso = {
+      enable = true;
+      settings = {
+        general = {
+          dbpath = "/var/lib/isso/comments.db";
+          host = "http://localhost";
+        };
+      };
+    };
+  };
+
+  testScript = let
+    port = 8080;
+  in
+  ''
+    machine.wait_for_unit("isso.service")
+
+    machine.wait_for_open_port(${toString port})
+
+    machine.succeed("curl --fail http://localhost:${toString port}/?uri")
+    machine.succeed("curl --fail http://localhost:${toString port}/js/embed.min.js")
+  '';
+})