summary refs log tree commit diff
path: root/nixos/tests/gitlab.nix
blob: bce862b4ad894f245dbb72fa79f5b2f76348ab61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This test runs gitlab and checks if it works

import ./make-test.nix ({ pkgs, ...} : {
  name = "gitlab";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ iElectric offline ];
  };

  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");
  '';
})