at 23.11-pre 639 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: { 2 name = "airsonic"; 3 meta = with pkgs.lib.maintainers; { 4 maintainers = [ sumnerevans ]; 5 }; 6 7 nodes.machine = 8 { pkgs, ... }: 9 { 10 services.airsonic = { 11 enable = true; 12 maxMemory = 800; 13 }; 14 }; 15 16 testScript = '' 17 def airsonic_is_up(_) -> bool: 18 status, _ = machine.execute("curl --fail http://localhost:4040/login") 19 return status == 0 20 21 22 machine.start() 23 machine.wait_for_unit("airsonic.service") 24 machine.wait_for_open_port(4040) 25 26 with machine.nested("Waiting for UI to work"): 27 retry(airsonic_is_up) 28 ''; 29})