@@ -93,7 +93,7 @@ namespace influxdb::test
93
93
{
94
94
auto http = createHttp ();
95
95
96
- REQUIRE_CALL (sessionMock, Post ()).RETURN (createResponse (cpr::ErrorCode::INTERNAL_ERROR , cpr::status::HTTP_OK));
96
+ REQUIRE_CALL (sessionMock, Post ()).RETURN (createResponse (cpr::ErrorCode::SEND_ERROR , cpr::status::HTTP_OK));
97
97
ALLOW_CALL (sessionMock, SetUrl (_));
98
98
ALLOW_CALL (sessionMock, UpdateHeader (_));
99
99
ALLOW_CALL (sessionMock, SetBody (_));
@@ -144,7 +144,7 @@ namespace influxdb::test
144
144
{
145
145
auto http = createHttp ();
146
146
147
- REQUIRE_CALL (sessionMock, Get ()).RETURN (createResponse (cpr::ErrorCode::CONNECTION_FAILURE , cpr::status::HTTP_OK));
147
+ REQUIRE_CALL (sessionMock, Get ()).RETURN (createResponse (cpr::ErrorCode::COULDNT_CONNECT , cpr::status::HTTP_OK));
148
148
ALLOW_CALL (sessionMock, SetUrl (_));
149
149
ALLOW_CALL (sessionMock, SetParameters (_));
150
150
@@ -188,7 +188,7 @@ namespace influxdb::test
188
188
{
189
189
auto http = createHttp ();
190
190
191
- REQUIRE_CALL (sessionMock, Post ()).RETURN (createResponse (cpr::ErrorCode::INTERNAL_ERROR , cpr::status::HTTP_OK));
191
+ REQUIRE_CALL (sessionMock, Post ()).RETURN (createResponse (cpr::ErrorCode::UNKNOWN_ERROR , cpr::status::HTTP_OK));
192
192
ALLOW_CALL (sessionMock, SetUrl (_));
193
193
ALLOW_CALL (sessionMock, SetParameters (_));
194
194
@@ -243,10 +243,11 @@ namespace influxdb::test
243
243
244
244
TEST_CASE (" Set proxy with authentication" , " [HttpTest]" )
245
245
{
246
+ using namespace std ::string_literals;
246
247
auto http = createHttp ();
247
248
248
249
REQUIRE_CALL (sessionMock, SetProxies (_)).WITH (_1[" http" ] == std::string{" https://auth-proxy-server:1234" } && _1[" https" ] == std::string{" https://auth-proxy-server:1234" });
249
- REQUIRE_CALL (sessionMock, SetProxyAuth (_)).WITH (_1[ " http" ] == std::string{ " abc: def" } && _1[ " https" ] == std::string{ " abc: def" } );
250
+ REQUIRE_CALL (sessionMock, SetProxyAuth (_)).WITH (_1. GetUsername ( " http" ) == " abc" s && _1. GetPassword ( " http " ) == " def" s && _1. GetUsername ( " https" ) == " abc" s && _1. GetPassword ( " https " ) == " def" s );
250
251
251
252
http.setProxy (Proxy{" https://auth-proxy-server:1234" , Proxy::Auth{" abc" , " def" }});
252
253
}
@@ -288,7 +289,7 @@ namespace influxdb::test
288
289
{
289
290
auto http = createHttp ();
290
291
291
- REQUIRE_CALL (sessionMock, Get ()).RETURN (createResponse (cpr::ErrorCode::CONNECTION_FAILURE , cpr::status::HTTP_OK));
292
+ REQUIRE_CALL (sessionMock, Get ()).RETURN (createResponse (cpr::ErrorCode::COULDNT_CONNECT , cpr::status::HTTP_OK));
292
293
ALLOW_CALL (sessionMock, SetUrl (_));
293
294
ALLOW_CALL (sessionMock, SetParameters (_));
294
295
0 commit comments