3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/tests/bazarr.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
727 B
Nix
Raw Normal View History

2020-05-10 11:54:09 +01:00
import ./make-test-python.nix ({ lib, ... }:
with lib;
let
port = 42069;
in
{
name = "bazarr";
2021-08-08 18:11:45 +01:00
meta.maintainers = with maintainers; [ d-xo ];
2020-05-10 11:54:09 +01:00
nodes.machine =
{ pkgs, ... }:
{
services.bazarr = {
enable = true;
listenPort = port;
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["unrar"];
# Workaround for https://github.com/morpheus65535/bazarr/issues/1983
# ("Crash when running without timezone info").
time.timeZone = "UTC";
2020-05-10 11:54:09 +01:00
};
testScript = ''
machine.wait_for_unit("bazarr.service")
machine.wait_for_open_port(${toString port})
2020-05-10 11:54:09 +01:00
machine.succeed("curl --fail http://localhost:${toString port}/")
'';
})