diff --git a/libnm/tests/test-nm-client.c b/libnm/tests/test-nm-client.c index e92e1cd1e3..c6b26a21ab 100644 --- a/libnm/tests/test-nm-client.c +++ b/libnm/tests/test-nm-client.c @@ -886,48 +886,6 @@ test_activate_virtual (void) } } -static void -activate_failed_cb (GObject *object, - GAsyncResult *result, - gpointer user_data) -{ - NMClient *client = NM_CLIENT (object); - NMActiveConnection *ac; - GError *error = NULL; - - ac = nm_client_add_and_activate_connection_finish (client, result, &error); - g_assert (ac == NULL); - g_assert_error (error, NM_CLIENT_ERROR, NM_CLIENT_ERROR_OBJECT_CREATION_FAILED); - g_clear_error (&error); - - g_main_loop_quit (gl.loop); -} - -static void -test_activate_failed (void) -{ - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - NMDevice *device; - gs_unref_object NMConnection *conn = NULL; - - sinfo = nmtstc_service_init (); - if (!nmtstc_service_available (sinfo)) - return; - - client = nmtstc_client_new (TRUE); - - device = nmtstc_service_add_device (sinfo, client, "AddWiredDevice", "eth0"); - - /* Note that test-networkmanager-service.py checks for this exact name */ - conn = nmtst_create_minimal_connection ("object-creation-failed-test", NULL, - NM_SETTING_WIRED_SETTING_NAME, NULL); - - nm_client_add_and_activate_connection_async (client, conn, device, NULL, - NULL, activate_failed_cb, NULL); - g_main_loop_run (gl.loop); -} - static void test_device_connection_compatibility (void) { @@ -1354,7 +1312,6 @@ main (int argc, char **argv) g_test_add_func ("/libnm/client-nm-running", test_client_nm_running); g_test_add_func ("/libnm/active-connections", test_active_connections); g_test_add_func ("/libnm/activate-virtual", test_activate_virtual); - g_test_add_func ("/libnm/activate-failed", test_activate_failed); g_test_add_func ("/libnm/device-connection-compatibility", test_device_connection_compatibility); g_test_add_func ("/libnm/connection/invalid", test_connection_invalid); diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py index e91b45233e..1a8e2e6af5 100755 --- a/tools/test-networkmanager-service.py +++ b/tools/test-networkmanager-service.py @@ -1306,14 +1306,6 @@ class NetworkManager(ExportedObj): ac = ActiveConnection(device, con_inst, None) self.active_connection_add(ac) - - if NmUtil.con_hash_get_id(con_hash) == 'object-creation-failed-test': - # FIXME: this is not the right test, to delete the active-connection - # before returning it. It's the wrong order of what NetworkManager - # would do. - self.active_connection_remove(ac) - return ExportedObj.to_path(ac) - return ExportedObj.to_path(ac) def active_connection_add(self, ac):