nixosTests.nifi: migrate to runTestOn

Part of #386873
This commit is contained in:
Piotr Kwiecinski
2025-03-30 03:14:28 +02:00
parent ee0fecd318
commit 28cd6cadd2
2 changed files with 27 additions and 29 deletions

View File

@@ -815,7 +815,7 @@ in {
nginx-tmpdir = handleTest ./nginx-tmpdir.nix {};
nginx-unix-socket = handleTest ./nginx-unix-socket.nix {};
nginx-variants = handleTest ./nginx-variants.nix {};
nifi = handleTestOn ["x86_64-linux"] ./web-apps/nifi.nix {};
nifi = runTestOn ["x86_64-linux"] ./web-apps/nifi.nix;
nitter = handleTest ./nitter.nix {};
nix-config = handleTest ./nix-config.nix {};
nix-ld = handleTest ./nix-ld.nix {};

View File

@@ -1,34 +1,32 @@
import ../make-test-python.nix (
{ pkgs, ... }:
{
name = "nifi";
meta.maintainers = with pkgs.lib.maintainers; [ izorkin ];
{ pkgs, ... }:
{
name = "nifi";
meta.maintainers = with pkgs.lib.maintainers; [ izorkin ];
nodes = {
nifi =
{ pkgs, ... }:
{
virtualisation = {
memorySize = 2048;
diskSize = 4096;
};
services.nifi = {
enable = true;
enableHTTPS = false;
};
nodes = {
nifi =
{ pkgs, ... }:
{
virtualisation = {
memorySize = 2048;
diskSize = 4096;
};
};
services.nifi = {
enable = true;
enableHTTPS = false;
};
};
};
testScript = ''
nifi.start()
testScript = ''
nifi.start()
nifi.wait_for_unit("nifi.service")
nifi.wait_for_open_port(8080)
nifi.wait_for_unit("nifi.service")
nifi.wait_for_open_port(8080)
# Check if NiFi is running
nifi.succeed("curl --fail http://127.0.0.1:8080/nifi/login 2> /dev/null | grep 'NiFi Login'")
# Check if NiFi is running
nifi.succeed("curl --fail http://127.0.0.1:8080/nifi/login 2> /dev/null | grep 'NiFi Login'")
nifi.shutdown()
'';
}
)
nifi.shutdown()
'';
}