tests: Add delete_cb for network panel testing
Having a delete_cb to handle connection removal is useful for other tests. Add the function in preparation for VPN testing.
This commit is contained in:
parent
edc85abf91
commit
4f3aec794e
1 changed files with 16 additions and 0 deletions
|
@ -222,6 +222,22 @@ add_cb (GObject *object,
|
|||
WAIT_CHECK_REMAINING()
|
||||
}
|
||||
|
||||
static void
|
||||
delete_cb (GObject *object,
|
||||
GAsyncResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
NMRemoteConnection *connection = NM_REMOTE_CONNECTION (object);
|
||||
EventWaitInfo *info = user_data;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
nm_remote_connection_delete_finish (connection, result, &error);
|
||||
g_assert_no_error (error);
|
||||
|
||||
info->other_remaining--;
|
||||
WAIT_CHECK_REMAINING()
|
||||
}
|
||||
|
||||
static void
|
||||
test_connection_add (NetworkPanelFixture *fixture,
|
||||
gconstpointer user_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue