1import ./make-test-python.nix ({ lib, ... }:
2let
3 port = 5678;
4 webhookUrl = "http://example.com";
5in
6{
7 name = "n8n";
8 meta.maintainers = with lib.maintainers; [ freezeboy k900 ];
9
10 nodes.machine =
11 { pkgs, ... }:
12 {
13 services.n8n = {
14 enable = true;
15 webhookUrl = webhookUrl;
16 };
17 };
18
19 testScript = ''
20 machine.wait_for_unit("n8n.service")
21 machine.wait_for_console_text("Editor is now accessible via")
22 machine.succeed("curl --fail -vvv http://localhost:${toString port}/")
23 machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service")
24 '';
25})