Allow tests to use extraParams

This commit is contained in:
Sander van der Burg 2021-03-31 22:41:48 +02:00 committed by Sander van der Burg
parent 34e25ec3f4
commit 7b46303479
7 changed files with 17 additions and 16 deletions

View File

@ -1,4 +1,4 @@
{profileSettings, exprFile, tools, pkgs, system}:
{profileSettings, exprFile, extraParams, tools, pkgs, system}:
let
executeDeploy = import ../../../test-driver/util/execute-deploy.nix {
@ -6,7 +6,7 @@ let
};
processesEnvSystem = import ../build-disnix-env.nix ({
inherit pkgs system exprFile;
inherit pkgs system exprFile extraParams;
disnixDataDir = "${pkgs.disnix}/share/disnix";
} // profileSettings.params);
in

View File

@ -1,4 +1,4 @@
{profileSettings, exprFile, tools, pkgs, system}:
{profileSettings, exprFile, extraParams, tools, pkgs, system}:
let
executeDeploy = import ../../../test-driver/util/execute-deploy.nix {
@ -11,7 +11,7 @@ let
} // profileSettings.params);
processesEnvSystem = import ../build-docker-env.nix ({
inherit pkgs system exprFile;
inherit pkgs system exprFile extraParams;
} // profileSettings.params);
in
{

View File

@ -1,4 +1,4 @@
{profileSettings, exprFile, tools, pkgs, system}:
{profileSettings, exprFile, extraParams, tools, pkgs, system}:
let
executeDeploy = import ../../../test-driver/util/execute-deploy.nix {
@ -11,7 +11,7 @@ let
} // profileSettings.params);
processesEnvSystem = import ../build-s6-rc-env.nix ({
inherit pkgs system exprFile;
inherit pkgs system exprFile extraParams;
} // profileSettings.params);
in
{

View File

@ -1,4 +1,4 @@
{profileSettings, exprFile, tools, pkgs, system}:
{profileSettings, exprFile, extraParams, tools, pkgs, system}:
let
executeDeploy = import ../../../test-driver/util/execute-deploy.nix {
@ -11,7 +11,7 @@ let
} // profileSettings.params);
processesEnvSystem = import ../build-supervisord-env.nix ({
inherit pkgs system exprFile;
inherit pkgs system exprFile extraParams;
} // profileSettings.params);
in
{

View File

@ -1,4 +1,4 @@
{profileSettings, exprFile, tools, pkgs, system}:
{profileSettings, exprFile, extraParams, tools, pkgs, system}:
let
executeDeploy = import ../../../test-driver/util/execute-deploy.nix {
@ -6,7 +6,7 @@ let
};
processesEnvSystem = import ../build-systemd-env.nix ({
inherit pkgs system exprFile;
inherit pkgs system exprFile extraParams;
} // profileSettings.params);
deployEnv = if profileSettings.params.forceDisableUserChange

View File

@ -1,4 +1,4 @@
{profileSettings, exprFile, tools, pkgs, system}:
{profileSettings, exprFile, extraParams, tools, pkgs, system}:
let
executeDeploy = import ../../../test-driver/util/execute-deploy.nix {
@ -6,7 +6,7 @@ let
};
processesEnvSystem = import ../build-sysvinit-env.nix ({
inherit pkgs system exprFile;
inherit pkgs system exprFile extraParams;
} // profileSettings.params);
in
{

View File

@ -11,17 +11,17 @@ let
inherit pkgs system;
};
testSystemVariantForProcessManager = {processManager, profileSettings, exprFile, nixosConfig ? null, systemPackages ? [], initialTests ? null, readiness, tests}:
testSystemVariantForProcessManager = {processManager, profileSettings, exprFile, extraParams ? {}, nixosConfig ? null, systemPackages ? [], initialTests ? null, readiness, tests}:
let
processManagerModule = builtins.getAttr processManager processManagerModules;
processManagerSettings = import processManagerModule {
inherit profileSettings exprFile pkgs system tools;
inherit profileSettings exprFile extraParams pkgs system tools;
};
processes = import exprFile ({
inherit pkgs system processManager;
} // profileSettings.params);
} // extraParams // profileSettings.params);
in
with import "${nixpkgs}/nixos/lib/testing-python.nix" { inherit system; };
@ -77,6 +77,7 @@ in
{ processManagers
, profiles
, exprFile
, extraParams ? {}
, nixosConfig ? null
, systemPackages ? []
, initialTests ? null
@ -91,7 +92,7 @@ pkgs.lib.genAttrs profiles (profile:
in
pkgs.lib.genAttrs processManagers (processManager:
testSystemVariantForProcessManager {
inherit processManager profileSettings exprFile nixosConfig systemPackages initialTests readiness tests;
inherit processManager profileSettings exprFile extraParams nixosConfig systemPackages initialTests readiness tests;
}
)
)