about summary refs log tree commit diff
path: root/nixos/tests/geoserver.nix
blob: 7e5507a296eaff9487b68a55f97f33614fae15c3 (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
{ pkgs, lib, ... }: {

  name = "geoserver";
  meta = {
    maintainers = with lib; [ teams.geospatial.members ];
  };

  nodes = {
    machine = { pkgs, ... }: {
      virtualisation.diskSize = 2 * 1024;

      environment.systemPackages = [ pkgs.geoserver ];
    };
  };

  testScript = ''
    start_all()

    machine.execute("${pkgs.geoserver}/bin/geoserver-startup > /dev/null 2>&1 &")
    machine.wait_until_succeeds("curl --fail --connect-timeout 2 http://localhost:8080/geoserver", timeout=60)

    machine.succeed("curl --fail --connect-timeout 2 http://localhost:8080/geoserver/ows?service=WMS&version=1.3.0&request=GetCapabilities")
  '';
}