Skip to content

Commit 955232a

Browse files
committed
TESTS: Improve test_sysdb_enumpwent_filter
Added a case that was not checked before. It is the case when `attr`, `attr_name` and `addtl_filter` are all `NULL`.
1 parent 8e2284a commit 955232a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎src/tests/cmocka/test_sysdb_views.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,15 @@ static void test_sysdb_enumpwent_filter(void **state)
11491149
assert_int_equal(ret, EOK);
11501150
assert_int_equal(res->count, 1);
11511151
assert_user_attrs(res->msgs[0], test_ctx->domain, "alice", false);
1152+
1153+
ret = sysdb_enumpwent_filter(test_ctx, test_ctx->domain, NULL, NULL,
1154+
NULL, &res);
1155+
assert_int_equal(ret, EOK);
1156+
assert_int_equal(res->count, 3);
1157+
order_ldb_res_msgs(res);
1158+
assert_user_attrs(res->msgs[0], test_ctx->domain, "alice", false);
1159+
assert_user_attrs(res->msgs[1], test_ctx->domain, "barney", false);
1160+
assert_user_attrs(res->msgs[2], test_ctx->domain, "bob", false);
11521161
}
11531162

11541163
static void test_sysdb_enumpwent_filter_views(void **state)

0 commit comments

Comments
 (0)