summary refs log tree commit diff
path: root/nixos/tests/nexus.nix
blob: d12d06c2c00f95170f9d963b3a87ac58cf6414a5 (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
25
26
27
28
29
30
31
32
# verifies:
#   1. nexus service starts on server
#   2. nexus service can startup on server (creating database and all other initial stuff)
#   3. the web application is reachable via HTTP

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

  nodes = {

    server =
      { config, pkgs, ... }:
      { virtualisation.memorySize = 2048;
        virtualisation.diskSize = 2048;

        services.nexus.enable = true;
      };

  };

  testScript = ''
    startAll;

    $server->waitForUnit("nexus");
    $server->waitForOpenPort(8081);

    $server->succeed("curl -f 127.0.0.1:8081");
  '';
})