From 48232ce3d84a8c506193fd2c10b69fe037455166 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Sat, 5 Apr 2025 18:17:28 +0200 Subject: [PATCH] nixosTests.wastebin: migrate to runTest Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/wastebin.nix | 40 +++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index c71655064c11..c9de7c0c0249 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1412,7 +1412,7 @@ in wakapi = runTest ./wakapi.nix; warzone2100 = handleTest ./warzone2100.nix { }; wasabibackend = handleTest ./wasabibackend.nix { }; - wastebin = handleTest ./wastebin.nix { }; + wastebin = runTest ./wastebin.nix; watchdogd = handleTest ./watchdogd.nix { }; webhook = runTest ./webhook.nix; weblate = handleTest ./web-apps/weblate.nix { }; diff --git a/nixos/tests/wastebin.nix b/nixos/tests/wastebin.nix index dde1f658b948..79d05229eb7f 100644 --- a/nixos/tests/wastebin.nix +++ b/nixos/tests/wastebin.nix @@ -1,24 +1,22 @@ -import ./make-test-python.nix ( - { pkgs, lib, ... }: - { - name = "wastebin"; +{ lib, ... }: +{ + name = "wastebin"; - meta = { - maintainers = with lib.maintainers; [ pinpox ]; + meta = { + maintainers = with lib.maintainers; [ pinpox ]; + }; + + nodes.machine = + { pkgs, ... }: + { + services.wastebin = { + enable = true; + }; }; - nodes.machine = - { pkgs, ... }: - { - services.wastebin = { - enable = true; - }; - }; - - testScript = '' - machine.wait_for_unit("wastebin.service") - machine.wait_for_open_port(8088) - machine.succeed("curl --fail http://localhost:8088/") - ''; - } -) + testScript = '' + machine.wait_for_unit("wastebin.service") + machine.wait_for_open_port(8088) + machine.succeed("curl --fail http://localhost:8088/") + ''; +}