summary refs log tree commit diff
path: root/nixos/tests/gitlab.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/gitlab.nix')
-rw-r--r--nixos/tests/gitlab.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/tests/gitlab.nix b/nixos/tests/gitlab.nix
new file mode 100644
index 00000000000..27c65fe47e8
--- /dev/null
+++ b/nixos/tests/gitlab.nix
@@ -0,0 +1,21 @@
+# This test runs gitlab and checks if it works
+
+import ./make-test.nix {
+  name = "gitlab";
+
+  nodes = {
+    gitlab = { config, pkgs, ... }: {
+      virtualisation.memorySize = 768;
+      services.gitlab.enable = true;
+      services.gitlab.databasePassword = "gitlab";
+      systemd.services.gitlab.serviceConfig.TimeoutStartSec = "10min";
+    };
+  };
+
+  testScript = ''
+    $gitlab->start();
+    $gitlab->waitForUnit("gitlab.service");
+    $gitlab->waitForUnit("gitlab-sidekiq.service");
+    $gitlab->waitUntilSucceeds("curl http://localhost:8080/users/sign_in");
+  '';
+}