nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

nixosTests.n8n: migrate to runTest (#394932)

authored by

Gaétan Lepage and committed by
GitHub
08dc9736 e34066f0

+26 -28
+1 -1
nixos/tests/all-tests.nix
··· 756 756 mysql-autobackup = handleTest ./mysql/mysql-autobackup.nix {}; 757 757 mysql-backup = handleTest ./mysql/mysql-backup.nix {}; 758 758 mysql-replication = handleTest ./mysql/mysql-replication.nix {}; 759 - n8n = handleTest ./n8n.nix {}; 759 + n8n = runTest ./n8n.nix; 760 760 nagios = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./nagios.nix {}; 761 761 nar-serve = handleTest ./nar-serve.nix {}; 762 762 nat.firewall = handleTest ./nat.nix { withFirewall = true; };
+25 -27
nixos/tests/n8n.nix
··· 1 - import ./make-test-python.nix ( 2 - { lib, ... }: 3 - let 4 - port = 5678; 5 - webhookUrl = "http://example.com"; 6 - in 7 - { 8 - name = "n8n"; 9 - meta.maintainers = with lib.maintainers; [ 10 - freezeboy 11 - k900 12 - ]; 1 + { lib, ... }: 2 + let 3 + port = 5678; 4 + webhookUrl = "http://example.com"; 5 + in 6 + { 7 + name = "n8n"; 8 + meta.maintainers = with lib.maintainers; [ 9 + freezeboy 10 + k900 11 + ]; 13 12 14 - nodes.machine = 15 - { pkgs, ... }: 16 - { 17 - services.n8n = { 18 - enable = true; 19 - webhookUrl = webhookUrl; 20 - }; 13 + nodes.machine = 14 + { pkgs, ... }: 15 + { 16 + services.n8n = { 17 + enable = true; 18 + webhookUrl = webhookUrl; 21 19 }; 20 + }; 22 21 23 - testScript = '' 24 - machine.wait_for_unit("n8n.service") 25 - machine.wait_for_console_text("Editor is now accessible via") 26 - machine.succeed("curl --fail -vvv http://localhost:${toString port}/") 27 - machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service") 28 - ''; 29 - } 30 - ) 22 + testScript = '' 23 + machine.wait_for_unit("n8n.service") 24 + machine.wait_for_console_text("Editor is now accessible via") 25 + machine.succeed("curl --fail -vvv http://localhost:${toString port}/") 26 + machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service") 27 + ''; 28 + }