mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 20:53:48 +00:00
54ece050b8
the default hasn't been changed since 2009 this can improve our test performances nixos/tests: remove explicit memorySize <1024 1024MiB is now the default
29 lines
601 B
Nix
29 lines
601 B
Nix
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
name = "airsonic";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ sumnerevans ];
|
|
};
|
|
|
|
machine =
|
|
{ pkgs, ... }:
|
|
{
|
|
services.airsonic = {
|
|
enable = true;
|
|
maxMemory = 800;
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
def airsonic_is_up(_) -> bool:
|
|
return machine.succeed("curl --fail http://localhost:4040/login")
|
|
|
|
|
|
machine.start()
|
|
machine.wait_for_unit("airsonic.service")
|
|
machine.wait_for_open_port(4040)
|
|
|
|
with machine.nested("Waiting for UI to work"):
|
|
retry(airsonic_is_up)
|
|
'';
|
|
})
|