summaryrefslogtreecommitdiffstats
path: root/src/tests/sysdb-tests.c
diff options
context:
space:
mode:
authorPavel Reichl <preichl@redhat.com>2014-10-30 11:54:54 +0000
committerJakub Hrozek <jhrozek@redhat.com>2014-11-19 23:44:52 +0100
commita5b55bdfcda8bfce8cb2ced981773998093d7857 (patch)
tree0787a4fc02735026a604e9f00166a6a70cc93764 /src/tests/sysdb-tests.c
parent02011187307ce97d1f41810288b617682a1f311a (diff)
downloadsssd-a5b55bdfcda8bfce8cb2ced981773998093d7857.tar.gz
sssd-a5b55bdfcda8bfce8cb2ced981773998093d7857.tar.xz
sssd-a5b55bdfcda8bfce8cb2ced981773998093d7857.zip
SYSDB: sysdb_idmap_get_mappings returns ENOENT
sysdb_idmap_get_mappings returns ENOENT if no results were found. Part od solution for: https://fedorahosted.org/sssd/ticket/1991 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/tests/sysdb-tests.c')
-rw-r--r--src/tests/sysdb-tests.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index e01ddf478..d603a7a64 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -4746,6 +4746,12 @@ START_TEST (test_sysdb_search_return_ENOENT)
fail_if(ret != EOK, "Could not set up the test");
check_leaks_push(test_ctx);
+ /* id mapping */
+ ret = sysdb_idmap_get_mappings(test_ctx, test_ctx->domain, &res);
+ fail_unless(ret == ENOENT, "sysdb_idmap_get_mappings error [%d][%s].",
+ ret, strerror(ret));
+ talloc_zfree(res);
+
/* Search user */
ret = sysdb_search_user_by_name(test_ctx, test_ctx->domain,
"nonexisting_user", NULL, &msg);