summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-03-06 20:45:39 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-04-14 13:28:45 +0200
commit4a73eb4c8136f8e5fd47aa63e5b7c10afc10046e (patch)
tree86bc2c58780fc943d992026a69bea1a1fd32be0f /src
parentcf0be339522a5ddf8073c11c6da61784cf038bc4 (diff)
downloadsssd-4a73eb4c8136f8e5fd47aa63e5b7c10afc10046e.tar.gz
sssd-4a73eb4c8136f8e5fd47aa63e5b7c10afc10046e.tar.xz
sssd-4a73eb4c8136f8e5fd47aa63e5b7c10afc10046e.zip
sysdb-tests: Add missing assertions
The return valuee of functions test_remove_group_member sysdb_attrs_add_time_t were ignored and therefore this part of code was not tested. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/tests/sysdb-tests.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 7c2c6d208..7b150591b 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -1440,6 +1440,7 @@ START_TEST (test_sysdb_remove_group_member)
data->uid = _i - 1000; /* the UID of user to add */
ret = test_remove_group_member(data);
+ fail_if(ret != EOK, "Remove group member failed: %d", ret);
talloc_free(test_ctx);
}
@@ -1894,6 +1895,8 @@ static void cached_authentication_with_expiration(const char *username,
data->attrs = sysdb_new_attrs(data);
ret = sysdb_attrs_add_time_t(data->attrs, SYSDB_LAST_ONLINE_AUTH, now);
+ fail_unless(ret == EOK, "Could not mdd attribute "SYSDB_LAST_ONLINE_AUTH
+ ": %s", data->username);
ret = sysdb_set_user_attr(data->ctx->domain, data->username, data->attrs,
SYSDB_MOD_REP);