mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 08:39:08 +03:00
geoserver: add nixos test
This commit is contained in:
parent
3d84496c93
commit
a08880000d
@ -320,6 +320,7 @@ in {
|
|||||||
mimir = handleTest ./mimir.nix {};
|
mimir = handleTest ./mimir.nix {};
|
||||||
garage = handleTest ./garage {};
|
garage = handleTest ./garage {};
|
||||||
gemstash = handleTest ./gemstash.nix {};
|
gemstash = handleTest ./gemstash.nix {};
|
||||||
|
geoserver = runTest ./geoserver.nix;
|
||||||
gerrit = handleTest ./gerrit.nix {};
|
gerrit = handleTest ./gerrit.nix {};
|
||||||
geth = handleTest ./geth.nix {};
|
geth = handleTest ./geth.nix {};
|
||||||
ghostunnel = handleTest ./ghostunnel.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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "geoserver";
|
pname = "geoserver";
|
||||||
@ -32,6 +40,10 @@ stdenv.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests.geoserver = nixosTests.geoserver;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Open source server for sharing geospatial data";
|
description = "Open source server for sharing geospatial data";
|
||||||
homepage = "https://geoserver.org/";
|
homepage = "https://geoserver.org/";
|
||||||
|
Loading…
Reference in New Issue
Block a user