summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2018-05-24 18:39:20 +0200
committerBenjamin Berg <bberg@redhat.com>2018-05-29 15:19:50 +0200
commit4f3aec794e9c5a2ce9a10aa78ed3931fbd3dfcf2 (patch)
treeb64fc55d0a6eda927f842b7bed43a93130b43a9a /tests
parentedc85abf914278047f3c4b85becdb414c5ac0aaa (diff)
downloadgnome-control-center-4f3aec794e9c5a2ce9a10aa78ed3931fbd3dfcf2.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/network/test-network-panel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/network/test-network-panel.c b/tests/network/test-network-panel.c
index db5d36c72..92a2fb91d 100644
--- a/tests/network/test-network-panel.c
+++ b/tests/network/test-network-panel.c
@@ -223,6 +223,22 @@ add_cb (GObject *object,
}
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)
{