about summary refs log tree commit diff
path: root/nixos/tests/gocd-server.nix
blob: aff651c5278fb694ac6af3023b5876a9d610c746 (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
# verifies:
#   1. GoCD server starts
#   2. GoCD server responds

import ./make-test-python.nix ({ pkgs, ...} :

{
  name = "gocd-server";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ swarren83 ];
  };

  nodes = {
    server =
      { ... }:
      {
        virtualisation.memorySize = 2046;
        services.gocd-server.enable = true;
      };
  };

  testScript = ''
    server.start()
    server.wait_for_unit("gocd-server")
    server.wait_for_open_port(8153)
    server.wait_until_succeeds("curl -s -f localhost:8153/go")
  '';
})