From 60d429047ebd957859dbc6328da26c4b37475cc6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 15 Jan 2021 23:14:14 +0100 Subject: [PATCH] Fix workaround for the test failure with Ubuntu 14.04 libcurl Don't check for 200 status code. Also don't check the response body if we don't get it at all. --- tests/net/webrequest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/net/webrequest.cpp b/tests/net/webrequest.cpp index cc5830b802..6e12f57036 100644 --- a/tests/net/webrequest.cpp +++ b/tests/net/webrequest.cpp @@ -202,7 +202,7 @@ TEST_CASE_METHOD(RequestFixture, // for this one because it doesn't return anything in the body when // returning an error status code, so use another one. CreateAbs("https://httpstat.us/418"); - Run(wxWebRequest::State_Failed); + Run(wxWebRequest::State_Failed, 0); // For some reason, this test doesn't work with libcurl included in Ubuntu // 14.04, so skip it. @@ -214,9 +214,8 @@ TEST_CASE_METHOD(RequestFixture, else { CHECK( status == 418 ); + CHECK( request.GetResponse().AsString() == "418 I'm a teapot" ); } - - CHECK( request.GetResponse().AsString() == "418 I'm a teapot" ); } TEST_CASE_METHOD(RequestFixture,