about summary refs log tree commit diff
path: root/libnm/tests/test-remote-settings-client.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-06-04 00:08:31 +0200
committerMichael Biebl <biebl@debian.org>2018-06-04 00:08:31 +0200
commit0dd9df69fdbd475c48a0c8d5b0a1882550fe7321 (patch)
tree249cf25643b1fe408e10679bb61613bc6540e894 /libnm/tests/test-remote-settings-client.c
parent2e94a3b93171ab3fb95bf689aab1664d23988809 (diff)
parent04bc9e1cd3544445d883ad29ea108c1645c8e7b7 (diff)
Update upstream source from tag 'upstream/1.11.4'
Update to upstream version '1.11.4'
with Debian dir d0638aa2e32d5bae4e8daa021b9a66b7c4d6647e
Diffstat (limited to 'libnm/tests/test-remote-settings-client.c')
-rw-r--r--libnm/tests/test-remote-settings-client.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libnm/tests/test-remote-settings-client.c b/libnm/tests/test-remote-settings-client.c
index f6c37e91..45d60c06 100644
--- a/libnm/tests/test-remote-settings-client.c
+++ b/libnm/tests/test-remote-settings-client.c
@@ -63,6 +63,9 @@ test_add_connection (void)
 	time_t start, now;
 	gboolean done = FALSE;
 
+	if (!nmtstc_service_available (sinfo))
+		return;
+
 	connection = nmtst_create_minimal_connection (TEST_CON_ID, NULL, NM_SETTING_WIRED_SETTING_NAME, NULL);
 
 	nm_client_add_connection_async (client,
@@ -137,6 +140,9 @@ test_make_invisible (void)
 	gboolean has_settings = FALSE;
 	char *path;
 
+	if (!nmtstc_service_available (sinfo))
+		return;
+
 	g_assert (remote != NULL);
 
 	/* Listen for the remove event when the connection becomes invisible */
@@ -215,6 +221,9 @@ test_make_visible (void)
 	char *path;
 	NMRemoteConnection *new = NULL;
 
+	if (!nmtstc_service_available (sinfo))
+		return;
+
 	g_assert (remote != NULL);
 
 	/* Wait for the new-connection signal when the connection is visible again */
@@ -304,6 +313,9 @@ test_remove_connection (void)
 	gboolean done = FALSE;
 	char *path;
 
+	if (!nmtstc_service_available (sinfo))
+		return;
+
 	/* Find a connection to delete */
 	conns = nm_client_get_connections (client);
 	g_assert_cmpint (conns->len, >, 0);
@@ -384,6 +396,9 @@ test_add_remove_connection (void)
 	time_t start, now;
 	gboolean done = FALSE;
 
+	if (!nmtstc_service_available (sinfo))
+		return;
+
 	/* This will cause the test server to immediately delete the connection
 	 * after creating it.
 	 */
@@ -437,6 +452,9 @@ test_add_bad_connection (void)
 	time_t start, now;
 	gboolean done = FALSE;
 
+	if (!nmtstc_service_available (sinfo))
+		return;
+
 	/* The test daemon doesn't support bond connections */
 	connection = nmtst_create_minimal_connection ("bad connection test", NULL, NM_SETTING_BOND_SETTING_NAME, NULL);
 
@@ -480,6 +498,9 @@ test_save_hostname (void)
 	gboolean done = FALSE;
 	GError *error = NULL;
 
+	if (!nmtstc_service_available (sinfo))
+		return;
+
 	/* test-networkmanager-service.py requires the hostname to contain a '.' */
 	nm_client_save_hostname (client, "foo", NULL, &error);
 	g_assert_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_HOSTNAME);