Skip to content

Commit 2626f12

Browse files
Temporarily disable Mac azuresdkforcpp tests (#6636)
* Temporarily disable Mac azuresdkforcpp tests
1 parent 17563c7 commit 2626f12

File tree

5 files changed

+148
-26
lines changed

5 files changed

+148
-26
lines changed

sdk/core/azure-core/test/ut/curl_connection_pool_test.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ namespace Azure { namespace Core { namespace Test {
4141

4242
/*********************** Unique Tests for Libcurl ********************************/
4343
#if defined(BUILD_CURL_HTTP_TRANSPORT_ADAPTER)
44-
4544
TEST(CurlConnectionPool, connectionPoolTest)
4645
{
4746
{
@@ -607,7 +606,11 @@ namespace Azure { namespace Core { namespace Test {
607606
}
608607
}
609608

609+
#if _azure_DISABLE_HTTP_BIN_TESTS
610+
TEST(CurlConnectionPool, DISABLED_forceConnectionClosed)
611+
#else
610612
TEST(CurlConnectionPool, forceConnectionClosed)
613+
#endif
611614
{
612615
Azure::Core::Http::Request req(
613616
Azure::Core::Http::HttpMethod::Get, Azure::Core::Url(AzureSdkHttpbinServer::Status(101)));
@@ -630,7 +633,11 @@ namespace Azure { namespace Core { namespace Test {
630633
}
631634
}
632635

636+
#if _azure_DISABLE_HTTP_BIN_TESTS
637+
TEST(CurlConnectionPool, DISABLED_connectionClose)
638+
#else
633639
TEST(CurlConnectionPool, connectionClose)
640+
#endif
634641
{
635642
/// When getting the header connection: close from an HTTP response, the connection should not
636643
/// be moved back to the pool.

sdk/core/azure-core/test/ut/curl_options_test.cpp

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ namespace Azure { namespace Core { namespace Test {
6060
}
6161

6262
/******************************* SSL options. ************************/
63-
TEST(CurlTransportOptions, noRevoke)
63+
#if _azure_DISABLE_HTTP_BIN_TESTS
64+
TEST(CurlConnectionPool, DISABLED_noRevoke)
65+
#else
66+
TEST(CurlConnectionPool, noRevoke)
67+
#endif
6468
{
6569
Azure::Core::Http::CurlTransportOptions curlOptions;
6670
curlOptions.SslOptions.EnableCertificateRevocationListCheck = true;
@@ -197,7 +201,11 @@ namespace Azure { namespace Core { namespace Test {
197201
}
198202
*/
199203

200-
TEST(CurlTransportOptions, sslVerifyOff)
204+
#if _azure_DISABLE_HTTP_BIN_TESTS
205+
TEST(CurlConnectionPool, DISABLED_sslVerifyOff)
206+
#else
207+
TEST(CurlConnectionPool, sslVerifyOff)
208+
#endif
201209
{
202210
Azure::Core::Http::CurlTransportOptions curlOptions;
203211
// If ssl verify is not disabled, this test would fail because the caInfo is not OK
@@ -295,7 +303,11 @@ namespace Azure { namespace Core { namespace Test {
295303
#endif
296304
}
297305

298-
TEST(CurlTransportOptions, httpsDefault)
306+
#if _azure_DISABLE_HTTP_BIN_TESTS
307+
TEST(CurlConnectionPool, DISABLED_httpsDefault)
308+
#else
309+
TEST(CurlConnectionPool, httpsDefault)
310+
#endif
299311
{
300312
auto transportAdapter = std::make_shared<Azure::Core::Http::CurlTransport>();
301313
Azure::Core::Http::Policies::TransportOptions options;
@@ -327,7 +339,11 @@ namespace Azure { namespace Core { namespace Test {
327339
.ConnectionPoolIndex.clear());
328340
}
329341

330-
TEST(CurlTransportOptions, disableKeepAlive)
342+
#if _azure_DISABLE_HTTP_BIN_TESTS
343+
TEST(CurlConnectionPool, DISABLED_disableKeepAlive)
344+
#else
345+
TEST(CurlConnectionPool, disableKeepAlive)
346+
#endif
331347
{
332348
Azure::Core::Http::CurlTransportOptions curlOptions;
333349
curlOptions.HttpKeepAlive = false;
@@ -365,7 +381,11 @@ namespace Azure { namespace Core { namespace Test {
365381
0);
366382
}
367383

368-
TEST(CurlTransportOptions, disableSslCaching)
384+
#if _azure_DISABLE_HTTP_BIN_TESTS
385+
TEST(CurlConnectionPool, DISABLED_disableSslCaching)
386+
#else
387+
TEST(CurlConnectionPool, disableSslCaching)
388+
#endif
369389
{
370390
Azure::Core::Http::CurlTransportOptions curlOptions;
371391
curlOptions.EnableCurlSslCaching = false;
@@ -401,5 +421,4 @@ namespace Azure { namespace Core { namespace Test {
401421
EXPECT_NO_THROW(Azure::Core::Http::_detail::CurlConnectionPool::g_curlConnectionPool
402422
.ConnectionPoolIndex.clear());
403423
}
404-
405424
}}} // namespace Azure::Core::Test

sdk/core/azure-core/test/ut/transport_adapter_base_test.cpp

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ namespace Azure { namespace Core { namespace Test {
1717

1818
using namespace Azure::Core::Json::_internal;
1919

20+
#if _azure_DISABLE_HTTP_BIN_TESTS
21+
TEST_P(TransportAdapter, DISABLED_get)
22+
#else
2023
TEST_P(TransportAdapter, get)
24+
#endif
2125
{
2226
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
2327

@@ -42,7 +46,11 @@ namespace Azure { namespace Core { namespace Test {
4246
EXPECT_EQ(jsonBody["headers"]["123"].get<std::string>(), std::string("456"));
4347
}
4448

49+
#if _azure_DISABLE_HTTP_BIN_TESTS
50+
TEST_P(TransportAdapter, DISABLED_get204)
51+
#else
4552
TEST_P(TransportAdapter, get204)
53+
#endif
4654
{
4755
Azure::Core::Url host("http://mt3.google.com/generate_204");
4856

@@ -63,7 +71,11 @@ namespace Azure { namespace Core { namespace Test {
6371
CheckBodyFromBuffer(*response, expectedResponseBodySize);
6472
}
6573

74+
#if _azure_DISABLE_HTTP_BIN_TESTS
75+
TEST_P(TransportAdapter, DISABLED_getLoop)
76+
#else
6677
TEST_P(TransportAdapter, getLoop)
78+
#endif
6779
{
6880
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
6981

@@ -79,7 +91,11 @@ namespace Azure { namespace Core { namespace Test {
7991
}
8092
}
8193

94+
#if _azure_DISABLE_HTTP_BIN_TESTS
95+
TEST_P(TransportAdapter, DISABLED_head)
96+
#else
8297
TEST_P(TransportAdapter, head)
98+
#endif
8399
{
84100
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
85101
auto expectedResponseBodySize = 0;
@@ -94,7 +110,11 @@ namespace Azure { namespace Core { namespace Test {
94110
EXPECT_GT(contentLengthHeader, 0);
95111
}
96112

113+
#if _azure_DISABLE_HTTP_BIN_TESTS
114+
TEST_P(TransportAdapter, DISABLED_put)
115+
#else
97116
TEST_P(TransportAdapter, put)
117+
#endif
98118
{
99119
Azure::Core::Url host(AzureSdkHttpbinServer::Put());
100120

@@ -117,7 +137,11 @@ namespace Azure { namespace Core { namespace Test {
117137
EXPECT_EQ(responseJson["data"].get<std::string>(), bodyAsString);
118138
}
119139

140+
#if _azure_DISABLE_HTTP_BIN_TESTS
141+
TEST_P(TransportAdapter, DISABLED_deleteRequest)
142+
#else
120143
TEST_P(TransportAdapter, deleteRequest)
144+
#endif
121145
{
122146
Azure::Core::Url host(AzureSdkHttpbinServer::Delete());
123147

@@ -133,7 +157,11 @@ namespace Azure { namespace Core { namespace Test {
133157
CheckBodyFromBuffer(*response, expectedResponseBodySize);
134158
}
135159

160+
#if _azure_DISABLE_HTTP_BIN_TESTS
161+
TEST_P(TransportAdapter, DISABLED_patch)
162+
#else
136163
TEST_P(TransportAdapter, patch)
164+
#endif
137165
{
138166
Azure::Core::Url host(AzureSdkHttpbinServer::Patch());
139167

@@ -149,7 +177,11 @@ namespace Azure { namespace Core { namespace Test {
149177
CheckBodyFromBuffer(*response, expectedResponseBodySize);
150178
}
151179

180+
#if _azure_DISABLE_HTTP_BIN_TESTS
181+
TEST_P(TransportAdapter, DISABLED_getChunk)
182+
#else
152183
TEST_P(TransportAdapter, getChunk)
184+
#endif
153185
{
154186
Azure::Core::Url host("http://anglesharp.azurewebsites.net/Chunked");
155187
auto expectedResponseBodySize = -1; // chunked will return unknown body length
@@ -167,7 +199,11 @@ namespace Azure { namespace Core { namespace Test {
167199
CheckBodyFromBuffer(*response, expectedResponseBodySize, expectedChunkResponse);
168200
}
169201

202+
#if _azure_DISABLE_HTTP_BIN_TESTS
203+
TEST_P(TransportAdapter, DISABLED_putErrorResponse)
204+
#else
170205
TEST_P(TransportAdapter, putErrorResponse)
206+
#endif
171207
{
172208
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
173209

@@ -188,7 +224,11 @@ namespace Azure { namespace Core { namespace Test {
188224
// ***Same tests but getting stream to pull from socket, simulating the Download Op
189225
// **********************
190226

227+
#if _azure_DISABLE_HTTP_BIN_TESTS
228+
TEST_P(TransportAdapter, DISABLED_getWithStream)
229+
#else
191230
TEST_P(TransportAdapter, getWithStream)
231+
#endif
192232
{
193233
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
194234

@@ -213,7 +253,11 @@ namespace Azure { namespace Core { namespace Test {
213253
EXPECT_EQ(jsonBody["headers"]["123"].get<std::string>(), std::string("456"));
214254
}
215255

256+
#if _azure_DISABLE_HTTP_BIN_TESTS
257+
TEST_P(TransportAdapter, DISABLED_getLoopWithStream)
258+
#else
216259
TEST_P(TransportAdapter, getLoopWithStream)
260+
#endif
217261
{
218262
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
219263

@@ -229,7 +273,11 @@ namespace Azure { namespace Core { namespace Test {
229273
}
230274
}
231275

276+
#if _azure_DISABLE_HTTP_BIN_TESTS
277+
TEST_P(TransportAdapter, DISABLED_headWitHStream)
278+
#else
232279
TEST_P(TransportAdapter, headWithStream)
280+
#endif
233281
{
234282
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
235283
auto expectedResponseBodySize = 0;
@@ -244,7 +292,11 @@ namespace Azure { namespace Core { namespace Test {
244292
EXPECT_GT(contentLengthHeader, 0);
245293
}
246294

295+
#if _azure_DISABLE_HTTP_BIN_TESTS
296+
TEST_P(TransportAdapter, DISABLED_putWithStream)
297+
#else
247298
TEST_P(TransportAdapter, putWithStream)
299+
#endif
248300
{
249301
Azure::Core::Url host(AzureSdkHttpbinServer::Put());
250302

@@ -260,7 +312,11 @@ namespace Azure { namespace Core { namespace Test {
260312
CheckBodyFromStream(*response, expectedResponseBodySize);
261313
}
262314

315+
#if _azure_DISABLE_HTTP_BIN_TESTS
316+
TEST_P(TransportAdapter, DISABLED_deleteRequestWithStream)
317+
#else
263318
TEST_P(TransportAdapter, deleteRequestWithStream)
319+
#endif
264320
{
265321
Azure::Core::Url host(AzureSdkHttpbinServer::Delete());
266322

@@ -276,7 +332,11 @@ namespace Azure { namespace Core { namespace Test {
276332
CheckBodyFromStream(*response, expectedResponseBodySize);
277333
}
278334

335+
#if _azure_DISABLE_HTTP_BIN_TESTS
336+
TEST_P(TransportAdapter, DISABLED_patchWithStream)
337+
#else
279338
TEST_P(TransportAdapter, patchWithStream)
339+
#endif
280340
{
281341
Azure::Core::Url host(AzureSdkHttpbinServer::Patch());
282342

@@ -313,7 +373,11 @@ namespace Azure { namespace Core { namespace Test {
313373
CheckBodyFromStream(*response, expectedResponseBodySize, expectedChunkResponse);
314374
}
315375

376+
#if _azure_DISABLE_HTTP_BIN_TESTS
377+
TEST_P(TransportAdapter, DISABLED_createResponseT)
378+
#else
316379
TEST_P(TransportAdapter, createResponseT)
380+
#endif
317381
{
318382
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
319383
std::string expectedType("This is the Response Type");
@@ -338,7 +402,11 @@ namespace Azure { namespace Core { namespace Test {
338402
EXPECT_STREQ(result.data(), std::string("").data());
339403
}
340404

405+
#if _azure_DISABLE_HTTP_BIN_TESTS
406+
TEST_P(TransportAdapter, DISABLED_customSizePut)
407+
#else
341408
TEST_P(TransportAdapter, customSizePut)
409+
#endif
342410
{
343411
Azure::Core::Url host(AzureSdkHttpbinServer::Put());
344412

@@ -356,7 +424,11 @@ namespace Azure { namespace Core { namespace Test {
356424
}
357425
}
358426

427+
#if _azure_DISABLE_HTTP_BIN_TESTS
428+
TEST_P(TransportAdapter, DISABLED_putWithStreamOnFail)
429+
#else
359430
TEST_P(TransportAdapter, putWithStreamOnFail)
431+
#endif
360432
{
361433
// point to bad address pah to generate server MethodNotAllowed error
362434
Azure::Core::Url host(AzureSdkHttpbinServer::Get());
@@ -399,7 +471,11 @@ namespace Azure { namespace Core { namespace Test {
399471
t1.join();
400472
}
401473

474+
#if _azure_DISABLE_HTTP_BIN_TESTS
475+
TEST_P(TransportAdapter, DISABLED_redirectsNotFollowed)
476+
#else
402477
TEST_P(TransportAdapter, redirectsNotFollowed)
478+
#endif
403479
{
404480
// We don't expect the transport adapter to follow redirects automatically to this url.
405481
std::string redirectToUrl = AzureSdkHttpbinServer::ResponseHeaders("foo=bar");
@@ -548,7 +624,11 @@ namespace Azure { namespace Core { namespace Test {
548624
}
549625
#endif
550626

627+
#if _azure_DISABLE_HTTP_BIN_TESTS
628+
TEST_P(TransportAdapter, DISABLED_SizePutFromFile)
629+
#else
551630
TEST_P(TransportAdapter, SizePutFromFile)
631+
#endif
552632
{
553633
Azure::Core::Url host(AzureSdkHttpbinServer::Put());
554634
std::string testDataPath(AZURE_TEST_DATA_PATH);
@@ -573,7 +653,11 @@ namespace Azure { namespace Core { namespace Test {
573653
}
574654
}
575655

656+
#if _azure_DISABLE_HTTP_BIN_TESTS
657+
TEST_P(TransportAdapter, DISABLED_SizePutFromFileDefault)
658+
#else
576659
TEST_P(TransportAdapter, SizePutFromFileDefault)
660+
#endif
577661
{
578662
Azure::Core::Url host(AzureSdkHttpbinServer::Put());
579663
std::string testDataPath(AZURE_TEST_DATA_PATH);
@@ -599,7 +683,11 @@ namespace Azure { namespace Core { namespace Test {
599683
}
600684
}
601685

686+
#if _azure_DISABLE_HTTP_BIN_TESTS
687+
TEST_P(TransportAdapter, DISABLED_SizePutFromFileBiggerPage)
688+
#else
602689
TEST_P(TransportAdapter, SizePutFromFileBiggerPage)
690+
#endif
603691
{
604692
Azure::Core::Url host(AzureSdkHttpbinServer::Put());
605693
std::string testDataPath(AZURE_TEST_DATA_PATH);
@@ -683,5 +771,4 @@ namespace Azure { namespace Core { namespace Test {
683771
EXPECT_STREQ(expectedBody.data(), bodyString.data());
684772
}
685773
}
686-
687774
}}} // namespace Azure::Core::Test

sdk/core/azure-core/test/ut/transport_adapter_base_test.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@
1212
#include <azure/core/http/http.hpp>
1313
#include <azure/core/internal/http/pipeline.hpp>
1414
#include <azure/core/io/body_stream.hpp>
15+
#include <azure/core/platform.hpp>
1516

1617
#include <memory>
1718
#include <vector>
1819

1920
#include <gtest/gtest.h>
2021

22+
#if defined(AZ_PLATFORM_MAC)
23+
#define _azure_DISABLE_HTTP_BIN_TESTS 1
24+
#endif
25+
2126
namespace Azure { namespace Core { namespace Test {
2227

2328
namespace _detail {

0 commit comments

Comments
 (0)