Skip to content

Commit b33e28b

Browse files
committed
update logic for compression unit test
1 parent 3357c43 commit b33e28b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/aws-cpp-sdk-monitoring-unit-tests/CloudWatchUnitTest.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ class CloudWatchTest : public Aws::Testing::AwsCppSdkGTestSuite {
4747
};
4848

4949
TEST_F(CloudWatchTest, TestUserAgentCompressionTracking) {
50-
#if defined(ENABLED_ZLIB_REQUEST_COMPRESSION) && ENABLED_ZLIB_REQUEST_COMPRESSION == 1
50+
#ifndef ENABLED_ZLIB_REQUEST_COMPRESSION
51+
GTEST_SKIP() << "ZLIB compression not available in this build";
52+
#endif
5153
// Setup mock response with proper CloudWatch XML
5254
std::shared_ptr<HttpRequest> requestTmp =
5355
CreateHttpRequest(Aws::Http::URI("dummy"), Aws::Http::HttpMethod::HTTP_POST, Aws::Utils::Stream::DefaultResponseStreamFactoryMethod);
@@ -102,7 +104,4 @@ TEST_F(CloudWatchTest, TestUserAgentCompressionTracking) {
102104
[](const Aws::String& value) { return value.find("m/") != Aws::String::npos && value.find("L") != Aws::String::npos; });
103105

104106
EXPECT_TRUE(businessMetrics != userAgentParsed.end());
105-
#else
106-
GTEST_SKIP() << "ZLIB compression not available in this build";
107-
#endif
108107
}

0 commit comments

Comments
 (0)