summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-09-04 23:29:22 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-09-05 11:51:16 +0200
commit51fbec23eb60317dcdefc33794477a0e36f16097 (patch)
tree8da2adea3cdce24202f9bea5a409e689a70babef /src/tests
parent315f3beea41e48c5103d65ecd9966d94a23518e5 (diff)
downloadsssd-51fbec23eb60317dcdefc33794477a0e36f16097.tar.gz
sssd-51fbec23eb60317dcdefc33794477a0e36f16097.tar.xz
sssd-51fbec23eb60317dcdefc33794477a0e36f16097.zip
SYSDB: Abort unit test if sysdb_getpwnam fails
Diffstat (limited to 'src/tests')
-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 d314baa9..be86f846 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -912,6 +912,9 @@ START_TEST (test_sysdb_getpwuid)
goto done;
}
+ fail_unless(res->count == 1, "Expected 1 user entry, found %d\n",
+ res->count);
+
username = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_NAME, 0);
e_username = talloc_asprintf(test_ctx, "testuser%d", _i);