diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 553f1758f018..2623f7cb2409 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -756,7 +756,7 @@ in { mysql-autobackup = handleTest ./mysql/mysql-autobackup.nix {}; mysql-backup = handleTest ./mysql/mysql-backup.nix {}; mysql-replication = handleTest ./mysql/mysql-replication.nix {}; - n8n = handleTest ./n8n.nix {}; + n8n = runTest ./n8n.nix; nagios = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./nagios.nix {}; nar-serve = handleTest ./nar-serve.nix {}; nat.firewall = handleTest ./nat.nix { withFirewall = true; }; diff --git a/nixos/tests/n8n.nix b/nixos/tests/n8n.nix index e5d730563c67..4d6ce0c0b2b7 100644 --- a/nixos/tests/n8n.nix +++ b/nixos/tests/n8n.nix @@ -1,30 +1,28 @@ -import ./make-test-python.nix ( - { lib, ... }: - let - port = 5678; - webhookUrl = "http://example.com"; - in - { - name = "n8n"; - meta.maintainers = with lib.maintainers; [ - freezeboy - k900 - ]; +{ lib, ... }: +let + port = 5678; + webhookUrl = "http://example.com"; +in +{ + name = "n8n"; + meta.maintainers = with lib.maintainers; [ + freezeboy + k900 + ]; - nodes.machine = - { pkgs, ... }: - { - services.n8n = { - enable = true; - webhookUrl = webhookUrl; - }; + nodes.machine = + { pkgs, ... }: + { + services.n8n = { + enable = true; + webhookUrl = webhookUrl; }; + }; - testScript = '' - machine.wait_for_unit("n8n.service") - machine.wait_for_console_text("Editor is now accessible via") - machine.succeed("curl --fail -vvv http://localhost:${toString port}/") - machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service") - ''; - } -) + testScript = '' + machine.wait_for_unit("n8n.service") + machine.wait_for_console_text("Editor is now accessible via") + machine.succeed("curl --fail -vvv http://localhost:${toString port}/") + machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service") + ''; +}