aboutsummaryrefslogtreecommitdiff
path: root/nixos/tests
diff options
context:
space:
mode:
authorKai Wohlfahrt <kai.wohlfahrt@gmail.com>2020-08-24 00:07:24 +0100
committerKai Wohlfahrt <kai.wohlfahrt@gmail.com>2020-11-21 15:39:19 +0000
commit9528faf1829bbf77fa693e8700cf8b27eb0b869e (patch)
tree949e594cc734a47cfad8e823173866bab8ef989b /nixos/tests
parent057cb570beb9226b610dffa00cffd98b007a0686 (diff)
nixos/openldap: Allow declarativeContents for multiple databases
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/openldap.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/tests/openldap.nix b/nixos/tests/openldap.nix
index 33b7b7f6608a..0c40073735eb 100644
--- a/nixos/tests/openldap.nix
+++ b/nixos/tests/openldap.nix
@@ -1,5 +1,5 @@
{ pkgs, system ? builtins.currentSystem, ... }: let
- declarativeContents = ''
+ dbContents = ''
dn: dc=example
objectClass: domain
dc: example
@@ -22,7 +22,6 @@ in {
machine = { pkgs, ... }: {
services.openldap = {
- inherit declarativeContents;
enable = true;
defaultSchemas = null;
dataDir = null;
@@ -49,6 +48,7 @@ in {
};
};
};
+ declarativeContents."dc=example" = dbContents;
};
};
};
@@ -60,11 +60,11 @@ in {
machine = { pkgs, ... }: {
services.openldap = {
- inherit declarativeContents;
enable = true;
suffix = "dc=example";
rootdn = "cn=root,dc=example";
rootpw = "notapassword";
+ declarativeContents = dbContents;
};
};
};
@@ -85,7 +85,7 @@ in {
};
testScript = let
- contents = pkgs.writeText "data.ldif" declarativeContents;
+ contents = pkgs.writeText "data.ldif" dbContents;
config = pkgs.writeText "config.ldif" ''
dn: cn=config
cn: config
@@ -129,7 +129,6 @@ in {
machine = { pkgs, ... }: {
services.openldap = {
- inherit declarativeContents;
enable = true;
suffix = "dc=example";
rootdn = "cn=root,dc=example";
@@ -140,6 +139,7 @@ in {
extraDatabaseConfig = ''
# No-op
'';
+ declarativeContents = dbContents;
};
};
};