summaryrefslogtreecommitdiff
path: root/shared/nm-test-utils-impl.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-12-22 14:05:22 +0100
committerThomas Haller <thaller@redhat.com>2015-12-26 16:43:49 +0100
commit5edd265c0b43440c8c9d2dafa1dcf3861be45a76 (patch)
tree49e6f40d05282cd23c5a29a61938f39cf8efccc7 /shared/nm-test-utils-impl.c
parentd90525ebfcfcd4325a063edd31dd3a578b97f39d (diff)
downloadNetworkManager-5edd265c0b43440c8c9d2dafa1dcf3861be45a76.tar.gz
libnm/tests: add nmtstc_nm_remote_settings_new()
Diffstat (limited to 'shared/nm-test-utils-impl.c')
-rw-r--r--shared/nm-test-utils-impl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shared/nm-test-utils-impl.c b/shared/nm-test-utils-impl.c
index 1f73cb35a9..91bf8b3c0c 100644
--- a/shared/nm-test-utils-impl.c
+++ b/shared/nm-test-utils-impl.c
@@ -268,6 +268,25 @@ nmtstc_nm_client_new (void)
return client;
}
+NMRemoteSettings *
+nmtstc_nm_remote_settings_new (void)
+{
+ NMRemoteSettings *settings;
+ DBusGConnection *bus;
+ GError *error = NULL;
+
+ bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+ g_assert_no_error (error);
+ g_assert (bus);
+
+ settings = nm_remote_settings_new (bus);
+ g_assert (settings);
+
+ dbus_g_connection_unref (bus);
+
+ return settings;
+}
+
#endif /* NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY */
/*****************************************************************************/