nixosTests.autobrr: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-13 23:50:51 +01:00
parent 48dda151d3
commit b1d55f037e
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 20 additions and 22 deletions

View file

@ -186,7 +186,7 @@ in {
auth-mysql = runTest ./auth-mysql.nix;
authelia = runTest ./authelia.nix;
auto-cpufreq = runTest ./auto-cpufreq.nix;
autobrr = handleTest ./autobrr.nix {};
autobrr = runTest ./autobrr.nix;
avahi = handleTest ./avahi.nix {};
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };
ayatana-indicators = runTest ./ayatana-indicators.nix;

View file

@ -1,25 +1,23 @@
import ./make-test-python.nix (
{ lib, ... }:
{ lib, ... }:
{
name = "autobrr";
meta.maintainers = with lib.maintainers; [ av-gal ];
{
name = "autobrr";
meta.maintainers = with lib.maintainers; [ av-gal ];
nodes.machine =
{ pkgs, ... }:
{
services.autobrr = {
enable = true;
# We create this secret in the Nix store (making it readable by everyone).
# DO NOT DO THIS OUTSIDE OF TESTS!!
secretFile = pkgs.writeText "session_secret" "not-secret";
};
nodes.machine =
{ pkgs, ... }:
{
services.autobrr = {
enable = true;
# We create this secret in the Nix store (making it readable by everyone).
# DO NOT DO THIS OUTSIDE OF TESTS!!
secretFile = pkgs.writeText "session_secret" "not-secret";
};
};
testScript = ''
machine.wait_for_unit("autobrr.service")
machine.wait_for_open_port(7474)
machine.succeed("curl --fail http://localhost:7474/")
'';
}
)
testScript = ''
machine.wait_for_unit("autobrr.service")
machine.wait_for_open_port(7474)
machine.succeed("curl --fail http://localhost:7474/")
'';
}