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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux