Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2013-12-21 20:50:34 +0100
committerArthur de Jong <arthur@arthurdejong.org>2013-12-21 21:38:50 +0100
commit19f3cc3a0ec8926a140e45b4b026cefa4e8c8894 (patch)
tree72980b885d5082009b3d22b6aeea7eec6baa2e44 /tests
parent09969cf0ecb92d7518c4026892fff65ec9002184 (diff)
Add a test for new configuration option
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cfg.c5
1 files changed, 4 insertions, 1 deletions
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");
}