diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index ef4fbce0c331..6ebc044ed0cd 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -597,6 +597,7 @@ in { # Fails on aarch64-linux at the PDF creation step - need to debug this on an # aarch64 machine.. musescore = handleTestOn ["x86_64-linux"] ./musescore.nix {}; + music-assistant = runTest ./music-assistant.nix; munin = handleTest ./munin.nix {}; mutableUsers = handleTest ./mutable-users.nix {}; mycelium = handleTest ./mycelium {}; diff --git a/nixos/tests/music-assistant.nix b/nixos/tests/music-assistant.nix new file mode 100644 index 000000000000..ac667ee95303 --- /dev/null +++ b/nixos/tests/music-assistant.nix @@ -0,0 +1,21 @@ +{ + lib, + ... +}: + +{ + name = "music-assistant"; + meta.maintainers = with lib.maintainers; [ hexa ]; + + nodes.machine = { + services.music-assistant = { + enable = true; + }; + }; + + testScript = '' + machine.wait_for_unit("music-assistant.service") + machine.wait_until_succeeds("curl --fail http://localhost:8095") + machine.log(machine.succeed("systemd-analyze security music-assistant.service | grep -v ✓")) + ''; +} diff --git a/pkgs/by-name/mu/music-assistant/package.nix b/pkgs/by-name/mu/music-assistant/package.nix index ebc6e953a1d8..ba7d00824652 100644 --- a/pkgs/by-name/mu/music-assistant/package.nix +++ b/pkgs/by-name/mu/music-assistant/package.nix @@ -2,6 +2,7 @@ , python3 , fetchFromGitHub , ffmpeg-headless +, nixosTests , substituteAll , providers ? [ ] }: @@ -99,6 +100,7 @@ python.pkgs.buildPythonApplication rec { providerPackages providerNames ; + tests = nixosTests.music-assistant; }; meta = with lib; {