From ce1acd97a7162094accfb764cb1d33159dc5165f Mon Sep 17 00:00:00 2001 From: Kai Wohlfahrt Date: Sun, 27 Sep 2020 18:03:40 +0100 Subject: nixos/openldap: fix path + base64 value types --- nixos/tests/openldap.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'nixos/tests/openldap.nix') 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"; + }; }; }; }; -- cgit 1.4.1