summary refs log tree commit diff
path: root/nixos/tests/openldap.nix
diff options
context:
space:
mode:
authorKai Wohlfahrt <kai.wohlfahrt@gmail.com>2020-09-27 18:03:40 +0100
committerKai Wohlfahrt <kai.wohlfahrt@gmail.com>2020-11-21 16:13:03 +0000
commitce1acd97a7162094accfb764cb1d33159dc5165f (patch)
treef2cdc7c028dacdbb571cb59bc7d490af969c01a3 /nixos/tests/openldap.nix
parentb2ebffe18634e5038fe911b3bd2c74d26e7a7ab9 (diff)
downloadnixpkgs-ce1acd97a7162094accfb764cb1d33159dc5165f.tar
nixpkgs-ce1acd97a7162094accfb764cb1d33159dc5165f.tar.gz
nixpkgs-ce1acd97a7162094accfb764cb1d33159dc5165f.tar.bz2
nixpkgs-ce1acd97a7162094accfb764cb1d33159dc5165f.tar.lz
nixpkgs-ce1acd97a7162094accfb764cb1d33159dc5165f.tar.xz
nixpkgs-ce1acd97a7162094accfb764cb1d33159dc5165f.tar.zst
nixpkgs-ce1acd97a7162094accfb764cb1d33159dc5165f.zip
nixos/openldap: fix path + base64 value types
Diffstat (limited to 'nixos/tests/openldap.nix')
-rw-r--r--nixos/tests/openldap.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/tests/openldap.nix b/nixos/tests/openldap.nix
index b6dd8f573d5..beaff916474 100644
--- a/nixos/tests/openldap.nix
+++ b/nixos/tests/openldap.nix
@@ -21,6 +21,7 @@ in {
     name = "openldap";
 
     machine = { pkgs, ... }: {
+      environment.etc."openldap/root_password".text = "notapassword";
       services.openldap = {
         enable = true;
         defaultSchemas = null;
@@ -37,13 +38,19 @@ in {
               ];
             };
             "olcDatabase={1}mdb" = {
+              # This tests string, base64 and path values, as well as lists of string values
               attrs = {
                 objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ];
                 olcDatabase = "{1}mdb";
                 olcDbDirectory = "/var/db/openldap";
                 olcSuffix = "dc=example";
-                olcRootDN = "cn=root,dc=example";
-                olcRootPW = "notapassword";
+                olcRootDN = {
+                  # cn=root,dc=example
+                  base64 = "Y249cm9vdCxkYz1leGFtcGxl";
+                };
+                olcRootPW = {
+                  path = "/etc/openldap/root_password";
+                };
               };
             };
           };