Skip to content

fix client_get_streaming_test #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 17, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test for BOOST_NETWORK_ENABLE_HTTPS for https streaming test
  • Loading branch information
yhager committed May 17, 2018
commit c1702e3cecce7259a37cdcd37957bdf7ef91b9ac
6 changes: 2 additions & 4 deletions libs/network/test/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ if (Boost_FOUND)
client_get_test
client_get_different_port_test
# client_get_timeout_test
client_get_ready_test)
if (OPENSSL_FOUND)
list(APPEND TESTS client_get_streaming_test)
endif()
client_get_ready_test
client_get_streaming_test)
foreach ( test ${TESTS} )
add_executable(cpp-netlib-http-${test} ${test}.cpp)
add_dependencies(cpp-netlib-http-${test} cppnetlib-uri
Expand Down
2 changes: 2 additions & 0 deletions libs/network/test/http/client_get_streaming_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct body_handler {

TYPED_TEST_CASE(HTTPClientTest, ClientTypes);

#ifdef BOOST_NETWORK_ENABLE_HTTPS
TYPED_TEST(HTTPClientTest, GetStreamingTest) {
typename TypeParam::request request("https://www.boost.org");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @yhager -- we probably want to only build this particular test now if we've enabled HTTPS support. Can you try making this whole test conditional on whether the BOOST_NETWORK_ENABLE_HTTPS macro is defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be much simpler to do:

#if BOOST_NETWORK_ENABLE_HTTPS
TYPED_TEST(HTTPClientTest, GetStreamingTest) {
...
}
#endif

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Pushed the change you requested. Sorry for misunderstanding what you meant.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks!

typename TypeParam::response response;
Expand All @@ -45,3 +46,4 @@ TYPED_TEST(HTTPClientTest, GetStreamingTest) {
}
EXPECT_EQ(dummy_body, typename TypeParam::string_type());
}
#endif
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy