forked from mirrors/nixpkgs
geoserver: add nixos test
This commit is contained in:
parent
3d84496c93
commit
a08880000d
|
@ -320,6 +320,7 @@ in {
|
|||
mimir = handleTest ./mimir.nix {};
|
||||
garage = handleTest ./garage {};
|
||||
gemstash = handleTest ./gemstash.nix {};
|
||||
geoserver = runTest ./geoserver.nix;
|
||||
gerrit = handleTest ./gerrit.nix {};
|
||||
geth = handleTest ./geth.nix {};
|
||||
ghostunnel = handleTest ./ghostunnel.nix {};
|
||||
|
|
24
nixos/tests/geoserver.nix
Normal file
24
nixos/tests/geoserver.nix
Normal file
|
@ -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")
|
||||
'';
|
||||
}
|
|
@ -1,4 +1,12 @@
|
|||
{ lib, stdenv, fetchurl, unzip, jre, makeWrapper }:
|
||||
{ lib
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, nixosTests
|
||||
, stdenv
|
||||
|
||||
, jre
|
||||
, unzip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "geoserver";
|
||||
|
@ -32,6 +40,10 @@ stdenv.mkDerivation rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.geoserver = nixosTests.geoserver;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open source server for sharing geospatial data";
|
||||
homepage = "https://geoserver.org/";
|
||||
|
|
Loading…
Reference in a new issue