nixos/slimserver: init service test

This commit is contained in:
Adam Stephens 2023-11-04 21:43:15 -04:00
parent 02d2a3fbb8
commit aafccbad47
No known key found for this signature in database
3 changed files with 22 additions and 0 deletions

View File

@ -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 {};

View 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'")
'';
})

View File

@ -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";