1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/tests/mympd.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
639 B
Nix
Raw Normal View History

2023-12-18 21:31:29 +00:00
import ./make-test-python.nix (
{ pkgs, lib, ... }:
{
2023-12-18 21:31:29 +00:00
name = "mympd";
nodes.mympd = {
services.mympd = {
enable = true;
settings = {
http_port = 8081;
};
2023-12-18 21:31:29 +00:00
};
services.mpd.enable = true;
};
testScript = ''
start_all();
machine.wait_for_unit("mympd.service");
# Ensure that mympd can connect to mpd
machine.wait_until_succeeds(
"journalctl -eu mympd -o cat | grep 'Connected to MPD'"
)
# Ensure that the web server is working
machine.succeed("curl http://localhost:8081 --compressed | grep -o myMPD")
'';
}
)