about summary refs log tree commit diff
path: root/nixos/tests/geoserver.nix
diff options
context:
space:
mode:
authorIvan Mincik <ivan.mincik@gmail.com>2023-11-17 23:29:45 +0100
committerIvan Mincik <ivan.mincik@gmail.com>2023-11-18 11:13:05 +0100
commita08880000dee157f618dc790ac3093e80cfc2b36 (patch)
treec2a9df6d5d20a2882e112be1e44e2deea5f2ea30 /nixos/tests/geoserver.nix
parent3d84496c930846948fb87bfc3dfce9997d5c713c (diff)
geoserver: add nixos test
Diffstat (limited to 'nixos/tests/geoserver.nix')
-rw-r--r--nixos/tests/geoserver.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixos/tests/geoserver.nix b/nixos/tests/geoserver.nix
new file mode 100644
index 0000000000000..7e5507a296eaf
--- /dev/null
+++ b/nixos/tests/geoserver.nix
@@ -0,0 +1,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")
+  '';
+}