summary refs log tree commit diff
path: root/nixos/tests/hydra.nix
diff options
context:
space:
mode:
authorPhilipp Steinpass <philipp@xndr.de>2017-09-02 21:23:56 +0200
committerRobin Gloster <mail@glob.in>2017-09-02 23:07:42 +0200
commitd784b830051bb86172b9a3669826774cc20e1f41 (patch)
treec291b30fdcb1123459e35cf56d33fa344b4f3c8f /nixos/tests/hydra.nix
parent7bba4a169e092d6361782afb8ee693783084d400 (diff)
downloadnixlib-d784b830051bb86172b9a3669826774cc20e1f41.tar
nixlib-d784b830051bb86172b9a3669826774cc20e1f41.tar.gz
nixlib-d784b830051bb86172b9a3669826774cc20e1f41.tar.bz2
nixlib-d784b830051bb86172b9a3669826774cc20e1f41.tar.lz
nixlib-d784b830051bb86172b9a3669826774cc20e1f41.tar.xz
nixlib-d784b830051bb86172b9a3669826774cc20e1f41.tar.zst
nixlib-d784b830051bb86172b9a3669826774cc20e1f41.zip
nixos/hydra postgresql: Fix #27314 and add test case
Diffstat (limited to 'nixos/tests/hydra.nix')
-rw-r--r--nixos/tests/hydra.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixos/tests/hydra.nix b/nixos/tests/hydra.nix
new file mode 100644
index 000000000000..6abd7a5ad300
--- /dev/null
+++ b/nixos/tests/hydra.nix
@@ -0,0 +1,32 @@
+import ./make-test.nix ({ pkgs, ...} : {
+  name = "hydra-init-localdb";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ pstn ];
+  };
+
+  machine =
+    { config, pkgs, ... }:
+
+    {
+      services.hydra = {
+        enable = true;
+
+        #Hydra needs those settings to start up, so we add something not harmfull.
+        hydraURL = "example.com";
+        notificationSender = "example@example.com";
+      };
+    };
+
+  testScript =
+    ''
+      # let the system boot up
+      $machine->waitForUnit("multi-user.target");
+      # test whether the database is running
+      $machine->succeed("systemctl status postgresql.service");
+      # test whether the actual hydra daemons are running
+      $machine->succeed("systemctl status hydra-queue-runner.service");
+      $machine->succeed("systemctl status hydra-init.service");
+      $machine->succeed("systemctl status hydra-evaluator.service");
+      $machine->succeed("systemctl status hydra-send-stats.service");
+     '';
+})