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

Christophe Fergeau cfergeau at redhat.com
Wed Aug 2 10:32:42 UTC 2017


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Fri, Jul 14, 2017 at 03:32:32PM +0200, Pino Toscano wrote:
> 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 at redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20170802/3640e60d/attachment.sig>


More information about the Libosinfo mailing list