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