mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixosTests.n8n: migrate to runTest (#394932)
This commit is contained in:
commit
08dc9736a6
2 changed files with 26 additions and 28 deletions
|
@ -756,7 +756,7 @@ in {
|
|||
mysql-autobackup = handleTest ./mysql/mysql-autobackup.nix {};
|
||||
mysql-backup = handleTest ./mysql/mysql-backup.nix {};
|
||||
mysql-replication = handleTest ./mysql/mysql-replication.nix {};
|
||||
n8n = handleTest ./n8n.nix {};
|
||||
n8n = runTest ./n8n.nix;
|
||||
nagios = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./nagios.nix {};
|
||||
nar-serve = handleTest ./nar-serve.nix {};
|
||||
nat.firewall = handleTest ./nat.nix { withFirewall = true; };
|
||||
|
|
|
@ -1,30 +1,28 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, ... }:
|
||||
let
|
||||
port = 5678;
|
||||
webhookUrl = "http://example.com";
|
||||
in
|
||||
{
|
||||
name = "n8n";
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
freezeboy
|
||||
k900
|
||||
];
|
||||
{ lib, ... }:
|
||||
let
|
||||
port = 5678;
|
||||
webhookUrl = "http://example.com";
|
||||
in
|
||||
{
|
||||
name = "n8n";
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
freezeboy
|
||||
k900
|
||||
];
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.n8n = {
|
||||
enable = true;
|
||||
webhookUrl = webhookUrl;
|
||||
};
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.n8n = {
|
||||
enable = true;
|
||||
webhookUrl = webhookUrl;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("n8n.service")
|
||||
machine.wait_for_console_text("Editor is now accessible via")
|
||||
machine.succeed("curl --fail -vvv http://localhost:${toString port}/")
|
||||
machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service")
|
||||
'';
|
||||
}
|
||||
)
|
||||
testScript = ''
|
||||
machine.wait_for_unit("n8n.service")
|
||||
machine.wait_for_console_text("Editor is now accessible via")
|
||||
machine.succeed("curl --fail -vvv http://localhost:${toString port}/")
|
||||
machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service")
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue