/*
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 {
void *reply_pvt;
int last_hash_lookup;
};
{
/* 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,
{
return EOK;
}
{
int ret;
return 0;
}
{
struct sbus_get_id_ctx);
}
{
struct sbus_get_id_ctx);
/* Now do the same lookup again, just make sure the result was cached */
}
{
struct sbus_get_id_ctx);
}
{
struct sbus_get_id_ctx);
}
{
struct sbus_get_id_ctx);
return 0;
}
{
int opt;
};
};
/* Set debug level to invalid value so we can decide if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
}