summaryrefslogtreecommitdiff
path: root/tests/gitlab.nix
blob: 63d4c800df5901a3f919ee0c50f528984e0e8aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import <nixpkgs/nixos/tests/make-test.nix> ( { pkgs, ... }: {
  machine = { pkgs, config, lib, ... }: {
    virtualisation.memorySize = 1024;
    services.gitlab.enable = true;
    services.gitlab.databasePassword = "password";
    services.gitlab.secrets = { db = "password1"; otp = "password2"; secret = "password3"; };
    systemd.services.gitlab.serviceConfig.TimeoutStartSec = "60min";
  };
  testScript = ''
    $machine->start();
    $machine->waitUntilSucceeds("sleep 600");
    $machine->waitUntilSucceeds("sleep 600");
    $machine->waitUntilSucceeds("sleep 600");
    $machine->waitUntilSucceeds("sleep 600");
    $machine->waitUntilSucceeds("sleep 600");
    $machine->waitForUnit("gitlab.service");
    $machine->waitForUnit("gitlab-sidekiq.service");
    $machine->waitUntilSucceeds("curl http://localhost:8080/users/sign_in");
  '';
})