test_responder_cache_req.c revision c19374b2a9b676ca534f52ef76d80f0945fe8fb2
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher Pavel Březina <pbrezina@redhat.com>
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher Copyright (C) 2014 Red Hat
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher This program is free software; you can redistribute it and/or modify
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher it under the terms of the GNU General Public License as published by
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher the Free Software Foundation; either version 3 of the License, or
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher (at your option) any later version.
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher This program is distributed in the hope that it will be useful,
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher but WITHOUT ANY WARRANTY; without even the implied warranty of
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher GNU General Public License for more details.
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher You should have received a copy of the GNU General Public License
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher along with this program. If not, see <http://www.gnu.org/licenses/>.
8a2a49333b7df3a4b86db42cd20ec8286d2788d3Pavel Březina#include "responder/common/responder_cache_req.h"
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher#define TEST_CONF_DB "test_responder_cache_req_conf.ldb"
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher#define TEST_DOM_NAME "responder_cache_req_test"
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher cmocka_unit_test_setup_teardown(test_ ## test, \
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher cmocka_unit_test_setup_teardown(test_ ## test, \
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher#define run_cache_req(ctx, send_fn, done_fn, dom, crp, lookup, expret) do { \
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher req_mem_ctx = talloc_new(global_talloc_context); \
2c4bd0178670724598d88f7f15e4fcd63ff2a71fPavel Březina req = send_fn(req_mem_ctx, ctx->tctx->ev, ctx->rctx, \
544525ee1fc54d744c08465066e2b4a521f78224Stephen Gallagher /* NOTE: Please, instead of adding new create_[user|group] bool,
6ea6ec5cb7d9985e2730fb9d4657624d10aed4d8Nick Guay * use bitshift. */
bool create_user1;
bool create_user2;
bool create_group1;
bool create_group2;
NULL};
return version;
const char* user_name,
int user_id,
int group_id,
const char *ldbname;
const char *ldbupn;
SYSDB_UIDNUM, 0);
const char *ldbname;
SYSDB_GIDNUM, 0);
struct tevent_req *
bool fast_reply,
const char *opt_name,
const char *extra)
for (int i = 0; i < num_users; ++i) {
int opt;
switch(opt) {