parent
c9947f03d1
commit
04456442cc
@ -846,7 +846,7 @@ in {
|
|||||||
};
|
};
|
||||||
nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; };
|
nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; };
|
||||||
nixseparatedebuginfod = handleTest ./nixseparatedebuginfod.nix {};
|
nixseparatedebuginfod = handleTest ./nixseparatedebuginfod.nix {};
|
||||||
node-red = handleTest ./node-red.nix {};
|
node-red = runTest ./node-red.nix;
|
||||||
nomad = runTest ./nomad.nix;
|
nomad = runTest ./nomad.nix;
|
||||||
non-default-filesystems = handleTest ./non-default-filesystems.nix {};
|
non-default-filesystems = handleTest ./non-default-filesystems.nix {};
|
||||||
non-switchable-system = runTest ./non-switchable-system.nix;
|
non-switchable-system = runTest ./non-switchable-system.nix;
|
||||||
|
@ -1,38 +1,36 @@
|
|||||||
import ./make-test-python.nix (
|
{ pkgs, ... }:
|
||||||
{ pkgs, ... }:
|
{
|
||||||
{
|
name = "nodered";
|
||||||
name = "nodered";
|
meta = with pkgs.lib.maintainers; {
|
||||||
meta = with pkgs.lib.maintainers; {
|
maintainers = [ matthewcroughan ];
|
||||||
maintainers = [ matthewcroughan ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
client =
|
client =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.curl ];
|
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 = ''
|
testScript = ''
|
||||||
start_all()
|
start_all()
|
||||||
nodered.wait_for_unit("node-red.service")
|
nodered.wait_for_unit("node-red.service")
|
||||||
nodered.wait_for_open_port(1880)
|
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."):
|
with subtest("Check that the Node-RED webserver can be reached."):
|
||||||
assert "<title>Node-RED</title>" in client.succeed(
|
assert "<title>Node-RED</title>" in client.succeed(
|
||||||
"curl -sSf http:/nodered:1880/ | grep title"
|
"curl -sSf http:/nodered:1880/ | grep title"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user