[Libosinfo] [libosinfo PATCH 1/2] tests: test-mediauris: skip non-http URLs
Pino Toscano
ptoscano at redhat.com
Fri Jul 14 13:32:31 UTC 2017
The test uses libsoup, which supports only HTTP, and not other
protocols such as FTP. Hence, allow only http and https URLs.
---
tests/test-mediauris.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/test-mediauris.c b/tests/test-mediauris.c
index 5bfb4c9..afb055c 100644
--- a/tests/test-mediauris.c
+++ b/tests/test-mediauris.c
@@ -38,7 +38,8 @@ static void test_media(OsinfoMediaList *medialist, GError **error, SoupSession *
SoupMessage *msg;
guint status;
- if (url == NULL || g_str_equal(url, "")) {
+ if (url == NULL || g_str_equal(url, "") ||
+ (!g_str_has_prefix(url, "http://") && !g_str_has_prefix(url, "https://"))) {
tmp = tmp->next;
continue;
}
--
2.9.4
More information about the Libosinfo
mailing list