nixos/slimserver: init service test
This commit is contained in:
parent
02d2a3fbb8
commit
aafccbad47
@ -750,6 +750,7 @@ in {
|
||||
signal-desktop = handleTest ./signal-desktop.nix {};
|
||||
simple = handleTest ./simple.nix {};
|
||||
sing-box = handleTest ./sing-box.nix {};
|
||||
slimserver = handleTest ./slimserver.nix {};
|
||||
slurm = handleTest ./slurm.nix {};
|
||||
smokeping = handleTest ./smokeping.nix {};
|
||||
snapcast = handleTest ./snapcast.nix {};
|
||||
|
16
nixos/tests/slimserver.nix
Normal file
16
nixos/tests/slimserver.nix
Normal file
@ -0,0 +1,16 @@
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "slimserver";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ adamcstephens ];
|
||||
|
||||
nodes.machine = { ... }: {
|
||||
services.slimserver.enable = true;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
machine.wait_for_unit("slimserver.service")
|
||||
machine.wait_for_open_port(9000)
|
||||
machine.succeed("curl http://localhost:9000")
|
||||
machine.wait_until_succeeds("journalctl -eu slimserver.service | grep 'Completed dbOptimize Scan'")
|
||||
'';
|
||||
})
|
@ -5,6 +5,7 @@
|
||||
, lib
|
||||
, makeWrapper
|
||||
, monkeysAudio
|
||||
, nixosTests
|
||||
, perl536Packages
|
||||
, sox
|
||||
, stdenv
|
||||
@ -53,6 +54,10 @@ perlPackages.buildPerlPackage rec {
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) slimserver;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Logitech/slimserver";
|
||||
description = "Server for Logitech Squeezebox players. This server is also called Logitech Media Server";
|
||||
|
Loading…
Reference in New Issue
Block a user