diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/krb5_child-test.c | 2 | ||||
-rw-r--r-- | src/tests/krb5_utils-tests.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c index fa9374c2d..636f73363 100644 --- a/src/tests/krb5_child-test.c +++ b/src/tests/krb5_child-test.c @@ -260,9 +260,11 @@ create_dummy_req(TALLOC_CTX *mem_ctx, const char *user, case SSS_KRB5_TYPE_FILE: kr->krb5_ctx->cc_be = &file_cc; break; +#ifdef HAVE_KRB5_DIRCACHE case SSS_KRB5_TYPE_DIR: kr->krb5_ctx->cc_be = &dir_cc; break; +#endif /* HAVE_KRB5_DIRCACHE */ default: if (tmpl[0] != '/') { DEBUG(SSSDBG_OP_FAILURE, ("Unkown ccname database\n")); diff --git a/src/tests/krb5_utils-tests.c b/src/tests/krb5_utils-tests.c index bcd9acb19..581212997 100644 --- a/src/tests/krb5_utils-tests.c +++ b/src/tests/krb5_utils-tests.c @@ -357,6 +357,7 @@ START_TEST(test_illegal_patterns) } END_TEST +#ifdef HAVE_KRB5_DIRCACHE START_TEST(test_cc_dir_create) { char *residual; @@ -405,6 +406,8 @@ START_TEST(test_cc_dir_create) free(cwd); } END_TEST +#endif /* HAVE_KRB5_DIRCACHE */ + void setup_talloc_context(void) { @@ -694,7 +697,9 @@ Suite *krb5_utils_suite (void) tcase_add_checked_fixture (tc_create_dir, setup_create_dir, teardown_create_dir); tcase_add_test (tc_create_dir, test_illegal_patterns); +#ifdef HAVE_KRB5_DIRCACHE tcase_add_test (tc_create_dir, test_cc_dir_create); +#endif /* HAVE_KRB5_DIRCACHE */ if (getuid() == 0) { tcase_add_test (tc_create_dir, test_priv_ccache_dir); tcase_add_test (tc_create_dir, test_private_ccache_dir_in_user_dir); |