diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index f459cf4611d2..d6623d29ae12 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -846,7 +846,7 @@ in { }; nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; }; nixseparatedebuginfod = handleTest ./nixseparatedebuginfod.nix {}; - node-red = handleTest ./node-red.nix {}; + node-red = runTest ./node-red.nix; nomad = runTest ./nomad.nix; non-default-filesystems = handleTest ./non-default-filesystems.nix {}; non-switchable-system = runTest ./non-switchable-system.nix; diff --git a/nixos/tests/node-red.nix b/nixos/tests/node-red.nix index bb95246367c8..7361c6e884ed 100644 --- a/nixos/tests/node-red.nix +++ b/nixos/tests/node-red.nix @@ -1,38 +1,36 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "nodered"; - meta = with pkgs.lib.maintainers; { - maintainers = [ matthewcroughan ]; - }; +{ pkgs, ... }: +{ + name = "nodered"; + meta = with pkgs.lib.maintainers; { + maintainers = [ matthewcroughan ]; + }; - nodes = { - client = - { config, pkgs, ... }: - { - environment.systemPackages = [ pkgs.curl ]; + nodes = { + client = + { config, pkgs, ... }: + { + environment.systemPackages = [ pkgs.curl ]; + }; + nodered = + { config, pkgs, ... }: + { + services.node-red = { + enable = true; + openFirewall = true; }; - nodered = - { config, pkgs, ... }: - { - services.node-red = { - enable = true; - openFirewall = true; - }; - }; - }; + }; + }; - testScript = '' - start_all() - nodered.wait_for_unit("node-red.service") - nodered.wait_for_open_port(1880) + testScript = '' + start_all() + nodered.wait_for_unit("node-red.service") + nodered.wait_for_open_port(1880) - client.wait_for_unit("multi-user.target") + client.wait_for_unit("multi-user.target") - with subtest("Check that the Node-RED webserver can be reached."): - assert "Node-RED" in client.succeed( - "curl -sSf http:/nodered:1880/ | grep title" - ) - ''; - } -) + with subtest("Check that the Node-RED webserver can be reached."): + assert "Node-RED" in client.succeed( + "curl -sSf http:/nodered:1880/ | grep title" + ) + ''; +}