From e9a7bc917c3f5140b96995ee5cca9c71b7bbac5a Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski <2151333+piotrkwiecinski@users.noreply.github.com> Date: Fri, 4 Apr 2025 23:56:15 +0200 Subject: [PATCH] nixosTests.kimai: migrate to runTest Part of #386873 --- nixos/tests/all-tests.nix | 2 +- nixos/tests/kimai.nix | 36 +++++++++++++++++------------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index b932dd0f6cf0..2f3f43d7614a 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -675,7 +675,7 @@ in keycloak = discoverTests (import ./keycloak.nix); keyd = handleTest ./keyd.nix { }; keymap = handleTest ./keymap.nix { }; - kimai = handleTest ./kimai.nix { }; + kimai = runTest ./kimai.nix; kmonad = runTest ./kmonad.nix; knot = runTest ./knot.nix; komga = handleTest ./komga.nix { }; diff --git a/nixos/tests/kimai.nix b/nixos/tests/kimai.nix index dbe9b834edca..967d531f3c54 100644 --- a/nixos/tests/kimai.nix +++ b/nixos/tests/kimai.nix @@ -1,23 +1,21 @@ -import ./make-test-python.nix ( - { lib, ... }: +{ lib, ... }: - { - name = "kimai"; - meta.maintainers = with lib.maintainers; [ peat-psuwit ]; +{ + name = "kimai"; + meta.maintainers = with lib.maintainers; [ peat-psuwit ]; - nodes.machine = - { ... }: - { - services.kimai.sites."localhost" = { - database.createLocally = true; - }; + nodes.machine = + { ... }: + { + services.kimai.sites."localhost" = { + database.createLocally = true; }; + }; - testScript = '' - machine.wait_for_unit("phpfpm-kimai-localhost.service") - machine.wait_for_unit("nginx.service") - machine.wait_for_open_port(80) - machine.succeed("curl -v --location --fail http://localhost/") - ''; - } -) + testScript = '' + machine.wait_for_unit("phpfpm-kimai-localhost.service") + machine.wait_for_unit("nginx.service") + machine.wait_for_open_port(80) + machine.succeed("curl -v --location --fail http://localhost/") + ''; +}