summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kdb
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2014-07-22 17:17:45 +0200
committerMartin Kosek <mkosek@redhat.com>2014-09-26 11:28:26 +0200
commit757272a3f818e85e7f0b88060efbcd76d3a93f8b (patch)
treed46760bd910e5cd5b85aa0c126e62c94f5f57283 /daemons/ipa-kdb
parent3f8cfdab269490e4935db7d296c3fc7f2fa552f5 (diff)
downloadfreeipa-757272a3f818e85e7f0b88060efbcd76d3a93f8b.tar.gz
freeipa-757272a3f818e85e7f0b88060efbcd76d3a93f8b.tar.xz
freeipa-757272a3f818e85e7f0b88060efbcd76d3a93f8b.zip
ipa-kdb: fix unit tests
Reviewed-By: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'daemons/ipa-kdb')
-rw-r--r--daemons/ipa-kdb/Makefile.am1
-rw-r--r--daemons/ipa-kdb/tests/ipa_kdb_tests.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/daemons/ipa-kdb/Makefile.am b/daemons/ipa-kdb/Makefile.am
index b3d6a1b5e..80747491f 100644
--- a/daemons/ipa-kdb/Makefile.am
+++ b/daemons/ipa-kdb/Makefile.am
@@ -79,6 +79,7 @@ ipa_kdb_tests_LDADD = \
$(KRB5_LIBS) \
$(LDAP_LIBS) \
$(NDRPAC_LIBS) \
+ $(UNISTRING_LIBS) \
$(NSS_LIBS) \
-lkdb5 \
-lsss_idmap \
diff --git a/daemons/ipa-kdb/tests/ipa_kdb_tests.c b/daemons/ipa-kdb/tests/ipa_kdb_tests.c
index fbee4acdb..e1ae06a6e 100644
--- a/daemons/ipa-kdb/tests/ipa_kdb_tests.c
+++ b/daemons/ipa-kdb/tests/ipa_kdb_tests.c
@@ -174,7 +174,9 @@ START_TEST(test_get_authz_data_types)
for (c = 0; test_set[c].authz_data != NULL ||
test_set[c].global_authz_data != NULL; c++) {
ied->authz_data = test_set[c].authz_data;
- ipa_ctx->authz_data = test_set[c].global_authz_data;
+ ipa_ctx->config.authz_data = test_set[c].global_authz_data;
+ /* Set last_update to avoid LDAP lookups during tests */
+ ipa_ctx->config.last_update = time(NULL);
entry->princ = test_set[c].princ;
get_authz_data_types(krb5_ctx, entry, &with_pac, &with_pad);
fail_unless(with_pad == test_set[c].exp_with_pad, "with_pad not %s %s.",