nixos/mopidy: add test

This commit is contained in:
Felix Buehler 2024-11-14 23:40:14 +01:00
parent fba9ba64b3
commit 8f6ffd06a4
3 changed files with 16 additions and 0 deletions

View File

@ -619,6 +619,7 @@ in {
mongodb = handleTest ./mongodb.nix {};
moodle = handleTest ./moodle.nix {};
moonraker = handleTest ./moonraker.nix {};
mopidy = handleTest ./mopidy.nix {};
morph-browser = handleTest ./morph-browser.nix { };
morty = handleTest ./morty.nix {};
mosquitto = handleTest ./mosquitto.nix {};

12
nixos/tests/mopidy.nix Normal file
View File

@ -0,0 +1,12 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "mopidy";
nodes.machine = { ... }: {
services.mopidy.enable = true;
};
testScript = ''
machine.wait_for_unit("mopidy")
machine.wait_for_open_port(6680)
'';
})

View File

@ -8,6 +8,7 @@
glib-networking,
gobject-introspection,
pipewire,
nixosTests,
}:
pythonPackages.buildPythonApplication rec {
@ -57,6 +58,8 @@ pythonPackages.buildPythonApplication rec {
# There are no tests
doCheck = false;
passthru.tests = { inherit (nixosTests) mopidy; };
meta = with lib; {
homepage = "https://www.mopidy.com/";
description = "Extensible music server that plays music from local disk, Spotify, SoundCloud, and more";