[next] telepathy-glib: test_object_path: stop relying on registering an object in two places
Simon McVittie
smcv at kemper.freedesktop.org
Fri Mar 14 12:02:33 PDT 2014
Module: telepathy-glib
Branch: next
Commit: 291d63ceca6292d37ec1b51576c071cff05772b2
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=291d63ceca6292d37ec1b51576c071cff05772b2
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Mar 11 19:01:37 2014 +0000
test_object_path: stop relying on registering an object in two places
I'm going to drop support for this.
---
tests/dbus/connection.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/dbus/connection.c b/tests/dbus/connection.c
index 33f77fc..1441c48 100644
--- a/tests/dbus/connection.c
+++ b/tests/dbus/connection.c
@@ -280,6 +280,7 @@ test_object_path (Test *test,
"simple_protocol");
/* Register the same connection with an invalid object path */
+ tp_dbus_daemon_unregister_object (test->dbus, test->service_conn);
tp_dbus_daemon_register_object (test->dbus, invalid_path, test->service_conn);
tp_dbus_daemon_request_name (test->dbus, invalid_name, FALSE, &error);
g_assert_no_error (error);
@@ -289,6 +290,12 @@ test_object_path (Test *test,
g_assert (connection == NULL);
g_assert_error (error, TP_DBUS_ERRORS, TP_DBUS_ERROR_INVALID_OBJECT_PATH);
g_clear_error (&error);
+
+ /* Put it back where it was meant to be so we can do teardown. */
+ tp_dbus_daemon_unregister_object (test->dbus, test->service_conn);
+ tp_dbus_daemon_register_object (test->dbus,
+ tp_base_connection_get_object_path (test->service_conn_as_base),
+ test->service_conn);
}
int
More information about the telepathy-commits
mailing list