Fix test function to work with Nixpkgs 23.05
This commit is contained in:
parent
cc90d87001
commit
0e9ec77cc6
|
@ -11,7 +11,7 @@ let
|
|||
inherit pkgs system;
|
||||
};
|
||||
|
||||
testSystemVariantForProcessManager = {processManager, profileSettings, exprFile, extraParams ? {}, nixosConfig ? null, systemPackages ? [], initialTests ? null, readiness ? null, tests ? null, postTests ? null}:
|
||||
testSystemVariantForProcessManager = {name, processManager, profileSettings, exprFile, extraParams ? {}, nixosConfig ? null, systemPackages ? [], initialTests ? null, readiness ? null, tests ? null, postTests ? null}:
|
||||
let
|
||||
processManagerModule = builtins.getAttr processManager processManagerModules;
|
||||
|
||||
|
@ -31,7 +31,9 @@ let
|
|||
with import "${nixpkgs}/nixos/lib/testing-python.nix" { inherit system; };
|
||||
|
||||
makeTest {
|
||||
machine =
|
||||
inherit name;
|
||||
|
||||
nodes.machine =
|
||||
{pkgs, lib, ...}:
|
||||
|
||||
{
|
||||
|
@ -77,13 +79,14 @@ let
|
|||
let
|
||||
instance = builtins.getAttr instanceName processes;
|
||||
in
|
||||
tests ({ inherit instanceName instance; } // processManagerSettings.params)
|
||||
tests ({ inherit instanceName instance processManager; } // processManagerSettings.params)
|
||||
) (builtins.attrNames processes))
|
||||
|
||||
+ pkgs.lib.optionalString (postTests != null) (postTests (processManagerSettings.params // { inherit processes; }));
|
||||
};
|
||||
in
|
||||
{ processManagers
|
||||
{ name
|
||||
, processManagers
|
||||
, profiles
|
||||
, exprFile
|
||||
, extraParams ? {}
|
||||
|
@ -102,7 +105,7 @@ pkgs.lib.genAttrs profiles (profile:
|
|||
in
|
||||
pkgs.lib.genAttrs processManagers (processManager:
|
||||
testSystemVariantForProcessManager {
|
||||
inherit processManager profileSettings exprFile extraParams nixosConfig systemPackages initialTests readiness tests postTests;
|
||||
inherit name processManager profileSettings exprFile extraParams nixosConfig systemPackages initialTests readiness tests postTests;
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, testService, processManagers, profiles }:
|
||||
|
||||
testService {
|
||||
name = "docker";
|
||||
exprFile = ./processes.nix;
|
||||
systemPackages = [ pkgs.docker ];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, testService, processManagers, profiles }:
|
||||
|
||||
testService {
|
||||
name = "nginx-reverse-proxy-hostbased";
|
||||
exprFile = ./processes.nix;
|
||||
|
||||
readiness = {instanceName, instance, ...}:
|
||||
|
|
|
@ -41,6 +41,7 @@ let
|
|||
};
|
||||
in
|
||||
testService {
|
||||
name = "s6-svscan";
|
||||
exprFile = ./processes.nix;
|
||||
systemPackages = [ pkgs.s6-rc ];
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ let
|
|||
};
|
||||
in
|
||||
testService {
|
||||
name = "supervisord";
|
||||
exprFile = ./processes.nix;
|
||||
systemPackages = [ pkgs.python3Packages.supervisor ];
|
||||
|
||||
|
|
Loading…
Reference in New Issue