mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/zoneminder: add minimal test
This commit is contained in:
parent
e958afa0a9
commit
4f35b7ec5f
@ -348,6 +348,7 @@ in
|
||||
yabar = handleTest ./yabar.nix {};
|
||||
yggdrasil = handleTest ./yggdrasil.nix {};
|
||||
zfs = handleTest ./zfs.nix {};
|
||||
zsh-history = handleTest ./zsh-history.nix {};
|
||||
zoneminder = handleTest ./zoneminder.nix {};
|
||||
zookeeper = handleTest ./zookeeper.nix {};
|
||||
zsh-history = handleTest ./zsh-history.nix {};
|
||||
}
|
||||
|
23
nixos/tests/zoneminder.nix
Normal file
23
nixos/tests/zoneminder.nix
Normal file
@ -0,0 +1,23 @@
|
||||
import ./make-test-python.nix ({ lib, ...}:
|
||||
|
||||
{
|
||||
name = "zoneminder";
|
||||
meta.maintainers = with lib.maintainers; [ danielfullmer ];
|
||||
|
||||
machine = { ... }:
|
||||
{
|
||||
services.zoneminder = {
|
||||
enable = true;
|
||||
database.createLocally = true;
|
||||
database.username = "zoneminder";
|
||||
};
|
||||
time.timeZone = "America/New_York";
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("zoneminder.service")
|
||||
machine.wait_for_unit("nginx.service")
|
||||
machine.wait_for_open_port(8095)
|
||||
machine.succeed("curl --fail http://localhost:8095/")
|
||||
'';
|
||||
})
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, lib, fetchFromGitHub, fetchurl, substituteAll, cmake, makeWrapper, pkgconfig
|
||||
, curl, ffmpeg, glib, libjpeg, libselinux, libsepol, mp4v2, libmysqlclient, mysql, pcre, perl, perlPackages
|
||||
, polkit, utillinuxMinimal, x264, zlib
|
||||
, coreutils, procps, psmisc }:
|
||||
, coreutils, procps, psmisc, nixosTests }:
|
||||
|
||||
# NOTES:
|
||||
#
|
||||
@ -172,7 +172,10 @@ in stdenv.mkDerivation rec {
|
||||
"-DZM_WEB_GROUP=${user}"
|
||||
];
|
||||
|
||||
passthru = { inherit dirName; };
|
||||
passthru = {
|
||||
inherit dirName;
|
||||
tests = nixosTests.zoneminder;
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
PERL5LIB="$PERL5LIB''${PERL5LIB:+:}$out/${perl.libPrefix}"
|
||||
|
Loading…
Reference in New Issue
Block a user