Merge pull request #113584 from sternenseemann/openldap-tests

nixos/tests/openldap: fix evaluation when auto-called
This commit is contained in:
Maximilian Bosch 2021-02-18 20:49:14 +01:00 committed by GitHub
commit 2ec9a72b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,9 @@
{ pkgs, system ? builtins.currentSystem, ... }: let { pkgs ? (import ../.. { inherit system; config = { }; })
, system ? builtins.currentSystem
, ...
}:
let
dbContents = '' dbContents = ''
dn: dc=example dn: dc=example
objectClass: domain objectClass: domain
@ -16,7 +21,7 @@
''; '';
in { in {
# New-style configuration # New-style configuration
current = import ./make-test-python.nix { current = import ./make-test-python.nix ({ pkgs, ... }: {
inherit testScript; inherit testScript;
name = "openldap"; name = "openldap";
@ -53,10 +58,10 @@ in {
declarativeContents."dc=example" = dbContents; declarativeContents."dc=example" = dbContents;
}; };
}; };
}; }) { inherit pkgs system; };
# Old-style configuration # Old-style configuration
oldOptions = import ./make-test-python.nix { oldOptions = import ./make-test-python.nix ({ pkgs, ... }: {
inherit testScript; inherit testScript;
name = "openldap"; name = "openldap";
@ -72,10 +77,10 @@ in {
declarativeContents."dc=example" = dbContents; declarativeContents."dc=example" = dbContents;
}; };
}; };
}; }) { inherit system pkgs; };
# Manually managed configDir, for example if dynamic config is essential # Manually managed configDir, for example if dynamic config is essential
manualConfigDir = import ./make-test-python.nix { manualConfigDir = import ./make-test-python.nix ({ pkgs, ... }: {
name = "openldap"; name = "openldap";
machine = { pkgs, ... }: { machine = { pkgs, ... }: {
@ -121,5 +126,5 @@ in {
"systemctl restart openldap", "systemctl restart openldap",
) )
'' + testScript; '' + testScript;
}; }) { inherit system pkgs; };
} }