nixosTests.bazarr: migrate to runTest

Part of #386873
This commit is contained in:
Piotr Kwiecinski 2025-03-31 22:37:56 +02:00
parent 3a8c9fbc75
commit 79c1d5b7c7
No known key found for this signature in database
GPG key ID: EC0DE1CB9D5258B4
2 changed files with 21 additions and 23 deletions

View file

@ -203,7 +203,7 @@ in {
};
ayatana-indicators = runTest ./ayatana-indicators.nix;
babeld = runTest ./babeld.nix;
bazarr = handleTest ./bazarr.nix {};
bazarr = runTest ./bazarr.nix;
bcachefs = handleTestOn ["x86_64-linux" "aarch64-linux"] ./bcachefs.nix {};
beanstalkd = handleTest ./beanstalkd.nix {};
bees = handleTest ./bees.nix {};

View file

@ -1,26 +1,24 @@
import ./make-test-python.nix (
{ lib, ... }:
{ lib, ... }:
let
port = 42069;
in
{
name = "bazarr";
meta.maintainers = with lib.maintainers; [ d-xo ];
let
port = 42069;
in
{
name = "bazarr";
meta.maintainers = with lib.maintainers; [ d-xo ];
nodes.machine =
{ pkgs, ... }:
{
services.bazarr = {
enable = true;
listenPort = port;
};
nodes.machine =
{ pkgs, ... }:
{
services.bazarr = {
enable = true;
listenPort = port;
};
};
testScript = ''
machine.wait_for_unit("bazarr.service")
machine.wait_for_open_port(${toString port})
machine.succeed("curl --fail http://localhost:${toString port}/")
'';
}
)
testScript = ''
machine.wait_for_unit("bazarr.service")
machine.wait_for_open_port(${toString port})
machine.succeed("curl --fail http://localhost:${toString port}/")
'';
}