depot/third_party/nixpkgs/nixos/tests/mympd.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

27 lines
590 B
Nix

import ./make-test-python.nix ({pkgs, lib, ... }: {
name = "mympd";
nodes.mympd = {
services.mympd = {
enable = true;
settings = {
http_port = 8081;
};
};
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")
'';
})