diff options
author | Volker Lendecke <vl@samba.org> | 2010-04-17 20:16:14 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-19 14:27:22 +0200 |
commit | ac8860d83d85ee80db510fe214abbfdc2bfdbef8 (patch) | |
tree | eab1edbbe481ea70ab6b9557503c1fe5f73dc2d5 | |
parent | fc2cca5c28a603dc656b405019f82cafbe0c1d6a (diff) | |
download | samba-ac8860d83d85ee80db510fe214abbfdc2bfdbef8.tar.gz samba-ac8860d83d85ee80db510fe214abbfdc2bfdbef8.tar.bz2 samba-ac8860d83d85ee80db510fe214abbfdc2bfdbef8.zip |
libwbclient: Test wbcGetGroups
-rw-r--r-- | nsswitch/libwbclient/tests/wbclient.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/tests/wbclient.c b/nsswitch/libwbclient/tests/wbclient.c index 1a00f9d423..5be1fad56a 100644 --- a/nsswitch/libwbclient/tests/wbclient.c +++ b/nsswitch/libwbclient/tests/wbclient.c @@ -689,6 +689,19 @@ static bool test_wbc_logon_user(struct torture_context *tctx) return true; } +static bool test_wbc_getgroups(struct torture_context *tctx) +{ + wbcErr ret; + uint32_t num_groups; + gid_t *groups; + + ret = wbcGetGroups(getenv("USERNAME"), &num_groups, &groups); + torture_assert_wbc_equal(tctx, ret, WBC_ERR_SUCCESS, + "wbcGetGroups failed"); + wbcFreeMemory(groups); + return true; +} + struct torture_suite *torture_wbclient(void) { struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "WBCLIENT"); @@ -720,6 +733,8 @@ struct torture_suite *torture_wbclient(void) test_wbc_logon_user); torture_suite_add_simple_test(suite, "wbcChangeUserPassword", test_wbc_change_password); + torture_suite_add_simple_test(suite, "wbcGetGroups", + test_wbc_getgroups); return suite; } |