diff options
author | Stef Walter <stefw@redhat.com> | 2014-02-18 13:27:20 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-03-14 13:42:27 +0100 |
commit | f5e47e1d65f80ffdb1893feab18583a74d661214 (patch) | |
tree | 3e2264792d08ac345f55993c08df0ab4bbd8f98b /src/tests/common.h | |
parent | e35bff1cf25048a0dcafd6d8fdba60da82e88338 (diff) | |
download | sssd-f5e47e1d65f80ffdb1893feab18583a74d661214.tar.gz sssd-f5e47e1d65f80ffdb1893feab18583a74d661214.tar.xz sssd-f5e47e1d65f80ffdb1893feab18583a74d661214.zip |
sbus_tests: Add some testing of dispatch and handler code
This starts a DBus server with some handlers, and runs some method
calls against it.
Note that we don't use the codegen in the sbus_tests, as we sorta
want to test this non-codegen related functionality on its own before
we run the sbus_codegen_tests.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/tests/common.h')
-rw-r--r-- | src/tests/common.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/common.h b/src/tests/common.h index 149356af4..54da18f6a 100644 --- a/src/tests/common.h +++ b/src/tests/common.h @@ -100,4 +100,19 @@ int test_ev_loop(struct sss_test_ctx *tctx); bool ldb_modules_path_is_set(void); +DBusConnection * +test_dbus_setup_mock(TALLOC_CTX *mem_ctx, + struct tevent_context *loop, + sbus_server_conn_init_fn init_fn, + void *init_pvt_data); + +DBusMessage * +test_dbus_call_sync(DBusConnection *conn, + const char *object_path, + const char *interface, + const char *method, + DBusError *error, + int first_arg_type, + ...); + #endif /* !__TESTS_COMMON_H__ */ |