summary refs log tree commit diff
path: root/libnm/tests/test-remote-settings-client.c
diff options
context:
space:
mode:
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);