From 19f3cc3a0ec8926a140e45b4b026cefa4e8c8894 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 21 Dec 2013 20:50:34 +0100 Subject: Add a test for new configuration option --- tests/test_cfg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_cfg.c b/tests/test_cfg.c index 3fce39c..6f36460 100644 --- a/tests/test_cfg.c +++ b/tests/test_cfg.c @@ -206,7 +206,8 @@ static void test_read(void) "map passwd homeDirectory \"${homeDirectory:-/home/$uid}\"\n" "filter group (&(objeclClass=posixGroup)(gid=1*))\n" "\n" - "scope passwd one\n"); + "scope passwd one\n" + "cache dn2uid 10m 1s\n"); fclose(fp); /* parse the file */ cfg_defaults(&cfg); @@ -224,6 +225,8 @@ static void test_read(void) assertstreq(attmap_passwd_uid, "sAMAccountName"); assertstreq(group_filter, "(&(objeclClass=posixGroup)(gid=1*))"); assert(passwd_scope == LDAP_SCOPE_ONELEVEL); + assert(cfg.cache_dn2uid_positive == 10 * 60); + assert(cfg.cache_dn2uid_negative == 1); /* remove temporary file */ remove("temp.cfg"); } -- cgit v1.2.3