Skip to content

Commit d8aaf1a

Browse files
committed
Merge pull request cpp-netlib#158 from mclark4386/clientTestFix
changed http-client-get-test to pass if it was successfully redirected or simply succeeds
2 parents d05ad3f + 9dca154 commit d8aaf1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libs/network/test/http/client_get_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ BOOST_AUTO_TEST_CASE(http_client_get_test) {
2626
response.get_status(status_);
2727
response.get_status_message(status_message_);
2828
BOOST_CHECK_EQUAL ( version_.substr(0,7), "HTTP/1.");
29-
BOOST_CHECK_EQUAL ( status_, 302u );
30-
BOOST_CHECK_EQUAL ( status_message_, std::string("Found") );
29+
BOOST_CHECK ( status_ == 302u || status_ == 200u );
30+
BOOST_CHECK ( status_message_ == std::string("Found") || status_message_ == std::string("OK") );
3131
}
3232

3333
#ifdef NETWORK_ENABLE_HTTPS
@@ -47,8 +47,8 @@ BOOST_AUTO_TEST_CASE(https_client_get_test) {
4747
response.get_status(status_);
4848
response.get_status_message(status_message_);
4949
BOOST_CHECK_EQUAL ( version_.substr(0,7), "HTTP/1.");
50-
BOOST_CHECK_EQUAL ( status_, 302u );
51-
BOOST_CHECK_EQUAL ( status_message_, std::string("Found") );
50+
BOOST_CHECK ( status_ == 302u || status_ == 200u );
51+
BOOST_CHECK ( status_message_ == std::string("Found") || status_message_ == std::string("OK") );
5252
}
5353

5454
#endif

0 commit comments

Comments
 (0)