1import ./make-test-python.nix ({ pkgs, ... }: {
2 name = "airsonic";
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ sumnerevans ];
5 };
6
7 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 return machine.succeed("curl --fail http://localhost:4040/login")
19
20
21 machine.start()
22 machine.wait_for_unit("airsonic.service")
23 machine.wait_for_open_port(4040)
24
25 with machine.nested("Waiting for UI to work"):
26 retry(airsonic_is_up)
27 '';
28})