Skip to content

Commit

Permalink
nixos/mopidy: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey committed Nov 14, 2024
1 parent abc211f commit e931969
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,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 {};
Expand Down
12 changes: 12 additions & 0 deletions nixos/tests/mopidy.nix
Original file line number Diff line number Diff line change
@@ -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)
'';
})
3 changes: 3 additions & 0 deletions pkgs/applications/audio/mopidy/mopidy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
glib-networking,
gobject-introspection,
pipewire,
nixosTests,
}:

pythonPackages.buildPythonApplication rec {
Expand Down Expand Up @@ -62,6 +63,8 @@ pythonPackages.buildPythonApplication rec {
)
'';

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";
Expand Down

0 comments on commit e931969

Please sign in to comment.