summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2019-03-16 08:24:23 -0400
committerAaron Andersen <aaron@fosslib.net>2019-05-28 23:02:38 -0400
commit73e175a6cefe3c1dc79ed5d693c079d38e819884 (patch)
tree5bcbaaef8e4e9ccf5bb623fc10d09a53a340cc39 /nixos/tests
parent5cf98d29e71a4482317d0ef00d6085bbbe9f499f (diff)
downloadnixpkgs-73e175a6cefe3c1dc79ed5d693c079d38e819884.tar
nixpkgs-73e175a6cefe3c1dc79ed5d693c079d38e819884.tar.gz
nixpkgs-73e175a6cefe3c1dc79ed5d693c079d38e819884.tar.bz2
nixpkgs-73e175a6cefe3c1dc79ed5d693c079d38e819884.tar.lz
nixpkgs-73e175a6cefe3c1dc79ed5d693c079d38e819884.tar.xz
nixpkgs-73e175a6cefe3c1dc79ed5d693c079d38e819884.tar.zst
nixpkgs-73e175a6cefe3c1dc79ed5d693c079d38e819884.zip
nixos/limesurvey: add basic nixos test
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/limesurvey.nix21
2 files changed, 22 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index c1c9e7e5037..9c3c46af5d0 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -135,6 +135,7 @@ in
   leaps = handleTest ./leaps.nix {};
   lidarr = handleTest ./lidarr.nix {};
   #lightdm = handleTest ./lightdm.nix {};
+  limesurvey = handleTest ./limesurvey.nix {};
   login = handleTest ./login.nix {};
   #logstash = handleTest ./logstash.nix {};
   mailcatcher = handleTest ./mailcatcher.nix {};
diff --git a/nixos/tests/limesurvey.nix b/nixos/tests/limesurvey.nix
new file mode 100644
index 00000000000..ad66ada106b
--- /dev/null
+++ b/nixos/tests/limesurvey.nix
@@ -0,0 +1,21 @@
+import ./make-test.nix ({ pkgs, ... }: {
+  name = "limesurvey";
+  meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ];
+
+  machine =
+    { ... }:
+    { services.limesurvey.enable = true;
+      services.limesurvey.virtualHost.hostName = "example.local";
+      services.limesurvey.virtualHost.adminAddr = "root@example.local";
+
+      # limesurvey won't work without a dot in the hostname
+      networking.hosts."127.0.0.1" = [ "example.local" ];
+    };
+
+  testScript = ''
+    startAll;
+
+    $machine->waitForUnit('phpfpm-limesurvey.service');
+    $machine->succeed('curl http://example.local/') =~ /The following surveys are available/ or die;
+  '';
+})