common_mock_resp.c revision 150b76e13b7c4f3ccf1d709bf517ca2af6b2c9a2
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2013 Red Hat
SSSD tests: Common utilities for tests that exercise domains
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tests/cmocka/common_mock_resp.h"
/* Mock a responder context */
struct resp_ctx *
struct tevent_context *ev,
struct sss_domain_info *domains,
void *pvt_ctx)
{
return NULL;
}
return rctx;
}
/* Mock a client context */
struct cli_ctx *
{
return NULL;
}
return cctx;
}
/* Mock DP requests that finish immediatelly and return
* mocked values as per previous set by mock_account_recv
*/
struct tevent_req *
struct sss_domain_info *dom,
bool fast_reply,
enum sss_dp_acct_type type,
const char *opt_name,
const char *extra)
{
}
struct tevent_req *req,
char **err_msg)
{
if (cb) {
(cb)(sss_mock_ptr_type(void *));
}
return test_request_recv(req);
}
{
if (acct_cb) {
}
}
void mock_account_recv_simple(void)
{
}
/* Mock subdomain requests */
struct tevent_req *
bool force,
const char *hint)
{
}
{
return test_request_recv(req);
}