test_responder_cache_req.c revision 3688374991afb34bbaf2b7843683fc13dd77879d
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers Pavel Březina <pbrezina@redhat.com>
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers Copyright (C) 2014 Red Hat
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers This program is free software; you can redistribute it and/or modify
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers it under the terms of the GNU General Public License as published by
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers the Free Software Foundation; either version 3 of the License, or
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers (at your option) any later version.
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers This program is distributed in the hope that it will be useful,
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers but WITHOUT ANY WARRANTY; without even the implied warranty of
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers GNU General Public License for more details.
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers You should have received a copy of the GNU General Public License
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers along with this program. If not, see <http://www.gnu.org/licenses/>.
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers#include "responder/common/responder_cache_req.h"
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers#define TEST_CONF_DB "test_responder_cache_req_conf.ldb"
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers cmocka_unit_test_setup_teardown(test_ ## test, \
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers cmocka_unit_test_setup_teardown(test_ ## test, \
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers#define run_cache_req(ctx, send_fn, done_fn, dom, crp, lookup, expret) do { \
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers req_mem_ctx = talloc_new(global_talloc_context); \
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers req = send_fn(req_mem_ctx, ctx->tctx->ev, ctx->rctx, \
20bbd54f603994a3cc211d2795de16550882ed8dKay Sieversconst char *domains[] = {"responder_cache_req_test_a",
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers "responder_cache_req_test_b",
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers "responder_cache_req_test_c",
20bbd54f603994a3cc211d2795de16550882ed8dKay Sievers "responder_cache_req_test_d",
20bbd54f603994a3cc211d2795de16550882ed8dKay Sieversstruct cli_protocol_version *register_cli_protocol_version(void)
dbf61afb29e016fe1b4ac48312a782df1d60a3e6Kay Sievers static struct cli_protocol_version version[] = {
2001208c2ab631a69896d1f670c26846b70d1fb7Kay Sieversstatic void cache_req_user_by_name_test_done(struct tevent_req *req)
2001208c2ab631a69896d1f670c26846b70d1fb7Kay Sievers ctx = tevent_req_callback_data(req, struct cache_req_test_ctx);
946f1825751919a176cd0039002a514de0c9c70fHannes Reinecke ctx->tctx->error = cache_req_user_by_name_recv(ctx, req,
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)
int opt;
switch(opt) {