sbus_internal_tests.c revision 0161a3c5637a0c0092bf54c436bb3d6508d7df26
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2014 Red Hat
SSSD tests: SBUS internals
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 <popt.h>
#include "responder/common/responder.h"
#include "tests/cmocka/common_mock.h"
#include "sbus/sssd_dbus_private.h"
struct sbus_get_id_ctx {
struct sss_test_ctx *stc;
struct sbus_connection *conn;
void *reply_pvt;
int last_hash_lookup;
};
struct sbus_get_id_ctx *global_test_ctx;
{
/* just don't return NULL */
return (DBusConnection *) 0x42;
}
void
{
return;
}
{
return;
}
{
return;
}
{
return;
}
{
return sss_mock_ptr_type(DBusMessage *);
}
{
return global_test_ctx->last_hash_lookup;
}
struct tevent_immediate *imm,
void *pvt)
{
struct sbus_get_id_ctx);
}
int timeout_ms,
void *pvt,
{
struct tevent_immediate *imm;
return EOK;
}
void sbus_get_id_test_setup(void **state)
{
struct sbus_get_id_ctx *test_ctx;
int ret;
}
{
struct sbus_get_id_ctx);
}
void sbus_int_test_get_uid(void **state)
{
struct tevent_req *req;
struct sbus_get_id_ctx);
/* Now do the same lookup again, just make sure the result was cached */
}
{
struct sbus_get_id_ctx);
}
void sbus_int_test_get_uid_no_sender(void **state)
{
struct tevent_req *req;
struct sbus_get_id_ctx);
}
void sbus_get_id_test_teardown(void **state)
{
struct sbus_get_id_ctx);
}
{
int opt;
struct poptOption long_options[] = {
};
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
}