at 24.11-pre 590 B view raw
1import ./make-test-python.nix ({pkgs, lib, ... }: { 2 name = "mympd"; 3 4 nodes.mympd = { 5 services.mympd = { 6 enable = true; 7 settings = { 8 http_port = 8081; 9 }; 10 }; 11 12 services.mpd.enable = true; 13 }; 14 15 testScript = '' 16 start_all(); 17 machine.wait_for_unit("mympd.service"); 18 19 # Ensure that mympd can connect to mpd 20 machine.wait_until_succeeds( 21 "journalctl -eu mympd -o cat | grep 'Connected to MPD'" 22 ) 23 24 # Ensure that the web server is working 25 machine.succeed("curl http://localhost:8081 --compressed | grep -o myMPD") 26 ''; 27})