nixpkgs/nixos/tests/bazarr.nix
Bjørn Forsman 166c9c8269 nixos/tests/bazarr: fix eval error
The test still doesn't pass, it has some runtime issues as well.

Fixes: 5803706662 ("nixos/tests: fix type mismatch in wait_for_open_port")
2022-11-04 14:10:31 +01:00

28 lines
569 B
Nix

import ./make-test-python.nix ({ lib, ... }:
with lib;
let
port = 42069;
in
{
name = "bazarr";
meta.maintainers = with maintainers; [ d-xo ];
nodes.machine =
{ pkgs, ... }:
{
services.bazarr = {
enable = true;
listenPort = port;
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["unrar"];
};
testScript = ''
machine.wait_for_unit("bazarr.service")
machine.wait_for_open_port(${toString port})
machine.succeed("curl --fail http://localhost:${toString port}/")
'';
})