[Libosinfo] [libosinfo PATCH 2/2] tests: test-mediauris: show status code on failure

Pino Toscano ptoscano at redhat.com
Fri Jul 14 13:32:32 UTC 2017


It helps when debugging failures, to check what is actual error for an
URL.
---
 tests/test-mediauris.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-mediauris.c b/tests/test-mediauris.c
index afb055c..1b330ed 100644
--- a/tests/test-mediauris.c
+++ b/tests/test-mediauris.c
@@ -48,7 +48,7 @@ static void test_media(OsinfoMediaList *medialist, GError **error, SoupSession *
         msg = soup_message_new("HEAD", url);
         status = soup_session_send_message(session, msg);
 
-        fail_unless(SOUP_STATUS_IS_SUCCESSFUL(status), "Failed HEAD on %s", url);
+        fail_unless(SOUP_STATUS_IS_SUCCESSFUL(status), "Failed HEAD (code=%u) on %s", status, url);
 
         g_object_unref(msg);
         tmp = tmp->next;
-- 
2.9.4




More information about the Libosinfo mailing list