From 87c0d202977c212a6b7fd360ceaa295e422de87d Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Sun, 30 Aug 2020 10:35:13 +0300 Subject: [PATCH] tests: Skip metar tests when METAR_SOURCES couldn't be resolved --- libgweather/tests/metar.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgweather/tests/metar.c b/libgweather/tests/metar.c index 7d6c7c04..0b3025a2 100644 --- a/libgweather/tests/metar.c +++ b/libgweather/tests/metar.c @@ -142,6 +142,11 @@ test_metar_weather_stations (void) g_test_message ("SSL/TLS failure, please check your glib-networking installation"); g_test_failed (); return; + } else if (msg->status_code == SOUP_STATUS_CANT_RESOLVE) { + g_test_skip ("Could not resolve " METAR_SOURCES " - network sandboxed?"); + g_object_unref (session); + g_object_unref (msg); + return; } #if SOUP_CHECK_VERSION(2, 99, 2) g_assert_no_error (error); -- 2.34.1