From 6b22df9c5cbb23fcde7a03999e1e14ae8e0bcc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 25 Jan 2026 02:01:58 +0100 Subject: [PATCH] nixos/tests/rqbit: convert to runTest --- nixos/tests/all-tests.nix | 2 +- nixos/tests/rqbit.nix | 52 +++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index ed08e308eed0..da285ba3e7d0 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1389,7 +1389,7 @@ in rosenpass = runTest ./rosenpass.nix; roundcube = runTest ./roundcube.nix; routinator = handleTest ./routinator.nix { }; - rqbit = handleTest ./rqbit.nix { }; + rqbit = runTest ./rqbit.nix; rshim = handleTest ./rshim.nix { }; rspamd = handleTest ./rspamd.nix { }; rspamd-trainer = runTest ./rspamd-trainer.nix; diff --git a/nixos/tests/rqbit.nix b/nixos/tests/rqbit.nix index dcef770839b6..15dcea4fb97e 100644 --- a/nixos/tests/rqbit.nix +++ b/nixos/tests/rqbit.nix @@ -1,30 +1,28 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - let - port = 3030; - in - { - name = "rqbit"; - meta = { - maintainers = with pkgs.lib.maintainers; [ CodedNil ]; +{ pkgs, ... }: +let + port = 3030; +in +{ + name = "rqbit"; + meta = { + maintainers = with pkgs.lib.maintainers; [ CodedNil ]; + }; + + nodes.machine = + { pkgs, ... }: + { + services.rqbit = { + httpPort = port; + enable = true; + openFirewall = true; + }; }; - nodes.machine = - { pkgs, ... }: - { - services.rqbit = { - httpPort = port; - enable = true; - openFirewall = true; - }; - }; + testScript = /* python */ '' + machine.start() + machine.wait_for_unit("rqbit.service") + machine.wait_for_open_port(${toString port}) - testScript = /* python */ '' - machine.start() - machine.wait_for_unit("rqbit.service") - machine.wait_for_open_port(${toString port}) - - machine.succeed("curl --fail http://localhost:${toString port}") - ''; - } -) + machine.succeed("curl --fail http://localhost:${toString port}") + ''; +}