summary refs log tree commit diff
path: root/nixos/tests/n8n.nix
blob: ed93639f2a429840b70066b24ff3960ecd6f92ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import ./make-test-python.nix ({ lib, ... }:

with lib;

let
  port = 5678;
in
{
  name = "n8n";
  meta.maintainers = with maintainers; [ freezeboy ];

  nodes.machine =
    { pkgs, ... }:
    {
      services.n8n = {
        enable = true;
      };
    };

  testScript = ''
    machine.wait_for_unit("n8n.service")
    machine.wait_for_open_port("${toString port}")
    machine.succeed("curl --fail http://localhost:${toString port}/")
  '';
})