Skip to content

Commit

Permalink
# This is a combination of 21 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

s3 code gen updates

# This is the commit message #2:

fixes

# This is the commit message #3:

updates

# This is the commit message #4:

updates

# This is the commit message #5:

compiling version

# This is the commit message #6:

updates

# This is the commit message #7:

test changes

# This is the commit message #8:

updates

# This is the commit message #9:

temp changes in s3client

# This is the commit message #10:

for debug

# This is the commit message #11:

Update API model

# This is the commit message #12:

corrects the dual-stack endpoint configuration for cognitoidp
Added DeleteContactFlowVersion API and the CAMPAIGN flow type
AWS IoT SiteWise now supports ingestion and querying of Null (all data types) and NaN (double type) values of bad or uncertain data quality. New partial error handling prevents data loss during ingestion. Enabled by default for new customers; existing customers can opt-in.
Documentation-only update to address doc errors
Documentation-only update: clarified the description of the shareDecaySeconds parameter of the FairsharePolicy data type, clarified the description of the priority parameter of the JobQueueDetail data type.
Added `DigitGroupingStyle` in ThousandsSeparator to allow grouping by `LAKH`( Indian Grouping system ) currency. Support LAKH and `CRORE` currency types in Column Formatting.
This release adds support for the topic attribute FifoThroughputScope for SNS FIFO topics. For details, see the documentation history in the Amazon Simple Notification Service Developer Guide.
Increasing entryPoint in SparkSubmit to accept longer script paths. New limit is 4kb.

# This is the commit message #13:

upgrade smithy version (#3263)


# This is the commit message #14:

Refactor and simplify logic in sdksCommon cmake script to not rely on c2j model (#3251)


# This is the commit message #15:

Update API model

# This is the commit message #16:

Adds multi-turn input support for an Agent node in an Amazon Bedrock Flow
Docs Update for timeout changes
Rename WorkSpaces Web to WorkSpaces Secure Browser
AWS Elemental MediaLive adds a new feature, ID3 segment tagging, in CMAF Ingest output groups. It allows customers to insert ID3 tags into every output segment, controlled by a newly added channel schedule action Id3SegmentTagging.

# This is the commit message #17:

Fix serialization for query xml

# This is the commit message #18:

Update API model

# This is the commit message #19:

Added "future" allocation type for future dated capacity reservation

# This is the commit message #20:

add stable order for smoke tests + restoring client codegen (#3265)


# This is the commit message #21:

add protocol test models (clients+tests) to the repo
  • Loading branch information
sbera87 committed Jan 31, 2025
1 parent d421218 commit 1aef2a8
Show file tree
Hide file tree
Showing 1,264 changed files with 175,956 additions and 190,948 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.488
1.11.491
1 change: 0 additions & 1 deletion cmake/sdks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ function(add_sdks)
endif()

add_subdirectory("${SDK_DIR}")
message(STATUS "exporting ${SDK_TARGET}")
LIST(APPEND EXPORTS "${SDK_TARGET}")
unset(SDK_TARGET)
endforeach()
Expand Down
144 changes: 36 additions & 108 deletions cmake/sdksCommon.cmake
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0.
#

# helper function that that gives primitive map functionality by treating a colon as the key-value separator, while the list semi-colon separates pairs
# to use, pass the list-map in as a third parameter (see helper functions below)
function(get_map_element KEY VALUE_VAR)
foreach(ELEMENT_PAIR ${ARGN})
STRING(REGEX REPLACE "([^:]+):.*" "\\1" KEY_RESULT ${ELEMENT_PAIR})
if(${KEY_RESULT} STREQUAL ${KEY} )
STRING(REGEX REPLACE "[^:]+:(.*)" "\\1" VALUE_RESULT ${ELEMENT_PAIR})
set(${VALUE_VAR} "${VALUE_RESULT}" PARENT_SCOPE)
return()
endif()
endforeach()
set(${VALUE_VAR} "" PARENT_SCOPE)
endfunction(get_map_element)

function(get_multimap_element KEY VALUE_VAR)
# Return all values for a key from a flatmap
# I.e. given a flatmap list of items such as "key1:val1,val2,val3;key2:val2;key1:valDoNotLoseMe" and "key1" as arguments
# when called such as "get_flatmap_value(${TEST_NAME} TEMP_VAR ${TEST_DEPENDENCY_LIST})"
# will return "val1,val2,val3,valDoNotLoseMe"
function(get_flatmap_value KEY VALUE_VAR)
set(${VALUE_VAR} "" PARENT_SCOPE)
set(RETURN_LIST "")
foreach(ELEMENT_PAIR ${ARGN})
Expand All @@ -27,39 +16,30 @@ function(get_multimap_element KEY VALUE_VAR)
endif()
endforeach()
set(${VALUE_VAR} "${RETURN_LIST}" PARENT_SCOPE)
endfunction(get_multimap_element)

# a bunch of key-value retrieval functions for the list-maps we defined above
function(get_c2j_date_for_service SERVICE_NAME C2J_DATE_VAR)
get_map_element(${SERVICE_NAME} TEMP_VAR ${C2J_LIST})
set(${C2J_DATE_VAR} "${TEMP_VAR}" PARENT_SCOPE)
endfunction()

function(get_c2j_name_for_service SERVICE_NAME C2J_NAME_VAR)
get_map_element(${SERVICE_NAME} TEMP_VAR ${C2J_SPECIAL_NAME_LIST})
if(TEMP_VAR)
set(${C2J_NAME_VAR} "${TEMP_VAR}" PARENT_SCOPE)
else()
set(${C2J_NAME_VAR} "${SERVICE_NAME}" PARENT_SCOPE)
endif()
endfunction()
endfunction(get_flatmap_value)

function(get_test_projects_for_service SERVICE_NAME TEST_PROJECT_NAME_VAR)
get_multimap_element(${SERVICE_NAME} TEMP_VAR ${SDK_TEST_PROJECT_LIST})
get_flatmap_value(${SERVICE_NAME} TEMP_VAR ${SDK_TEST_PROJECT_LIST})
set(${TEST_PROJECT_NAME_VAR} "${TEMP_VAR}" PARENT_SCOPE)
endfunction()

function(get_dependencies_for_sdk PROJECT_NAME DEPENDENCY_LIST_VAR)
get_map_element(${PROJECT_NAME} TEMP_VAR ${SDK_DEPENDENCY_LIST})
get_flatmap_value(${PROJECT_NAME} TEMP_VAR ${SDK_DEPENDENCY_LIST})
if (TEMP_VAR)
string(REPLACE "," ";" TEMP_LIST_VAR ${TEMP_VAR})
list(FIND TEMP_LIST_VAR "core" _index)
if (${_index} GREATER -1) # old cmake search in a list syntax
# core is already there
set(${DEPENDENCY_LIST_VAR} "${TEMP_VAR}" PARENT_SCOPE)
return()
endif()
endif()
# "core" is the default dependency for every sdk.
# Since we removed the hand-written C2J_LIST and instead auto generating it based on models,
# and location of models may not exist or incorrect when SDK is installed and then source has been deleted by customers.
# we end up getting an incomplete C2J_LIST when customers call find_package(AWSSDK). But C2J_LIST is only used in customers code for dependencies completing.
set(${DEPENDENCY_LIST_VAR} "${TEMP_VAR},core" PARENT_SCOPE)
endfunction()

function(get_dependencies_for_test TEST_NAME DEPENDENCY_LIST_VAR)
get_map_element(${TEST_NAME} TEMP_VAR ${TEST_DEPENDENCY_LIST})
get_flatmap_value(${TEST_NAME} TEMP_VAR ${TEST_DEPENDENCY_LIST})
set(${DEPENDENCY_LIST_VAR} "${TEMP_VAR}" PARENT_SCOPE)
endfunction()

Expand All @@ -80,69 +60,21 @@ function(get_sdks_depending_on SDK_NAME DEPENDING_SDKS_VAR)
set(${DEPENDING_SDKS_VAR} "${TEMP_SDK_LIST}" PARENT_SCOPE)
endfunction()

# function that automatically picks up models from <sdkrootdir>/code-generation/api-descriptions/ directory and build
# C2J_LIST needed for generation, services have multiple models will use the latest model (decided by model files' date)
# services have the name format abc.def.ghi will be renamed to ghi-def-abc (dot will not be accepted as Windows directory name )
# and put into C2J_SPECIAL_NAME_LIST, but rumtime.lex will be renamed to lex based on historical reason.
# Function that reads <repo>/src/generated and builds a list of all available generated service clients for a build,
# The resulting $SERVICE_CLIENT_LIST is as simple as "cognito-identity,s3,dynamodb,etc,..."
function(build_sdk_list)
file(GLOB ALL_MODEL_FILES "${CMAKE_CURRENT_SOURCE_DIR}/tools/code-generation/api-descriptions/*-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].normal.json")
foreach(model IN LISTS ALL_MODEL_FILES)
get_filename_component(modelName "${model}" NAME)
STRING(REGEX MATCH "([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])" date "${modelName}")
STRING(REGEX REPLACE "-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].normal.json" "" svc "${modelName}")
#special svc name conversion, e.g: runtime.lex->lex; abc.def.ghi->ghi-def-abc
if ("${svc}" STREQUAL "runtime.lex")
LIST(APPEND C2J_SPECIAL_NAME_LIST "lex:runtime.lex")
set(svc "lex")
elseif("${svc}" STREQUAL "runtime.lex.v2")
LIST(APPEND C2J_SPECIAL_NAME_LIST "lexv2-runtime:runtime.lex.v2")
set(svc "lexv2-runtime")
elseif("${svc}" STREQUAL "models.lex.v2")
LIST(APPEND C2J_SPECIAL_NAME_LIST "lexv2-models:models.lex.v2")
set(svc "lexv2-models")
elseif ("${svc}" STREQUAL "transfer")
LIST(APPEND C2J_SPECIAL_NAME_LIST "awstransfer:transfer")
set(svc "awstransfer")
elseif ("${svc}" STREQUAL "transcribe-streaming")
LIST(APPEND C2J_SPECIAL_NAME_LIST "transcribestreaming:transcribe-streaming")
set(svc "transcribestreaming")
elseif ("${svc}" STREQUAL "streams.dynamodb")
LIST(APPEND C2J_SPECIAL_NAME_LIST "dynamodbstreams:streams.dynamodb")
set (svc "dynamodbstreams")
elseif("${svc}" MATCHES "\\.")
string(REPLACE "." ";" nameParts ${svc})
LIST(REVERSE nameParts)
string(REPLACE ";" "-" tmpSvc "${nameParts}")
LIST(APPEND C2J_SPECIAL_NAME_LIST "${tmpSvc}:${svc}")
set(svc "${tmpSvc}")
elseif("${svc}" STREQUAL "ec2")
if(PLATFORM_ANDROID AND CMAKE_HOST_WIN32) # ec2 isn't building for android on windows atm due to an internal compiler error, TODO: investigate further
continue()
endif()
elseif("${svc}" STREQUAL "s3")
LIST(APPEND C2J_SPECIAL_NAME_LIST "s3-crt:s3")
message(STATUS "Add s3-crt:s3 to C2J_SPECIAL_NAME_LIST")
endif()
get_map_element(${svc} existingDate ${C2J_LIST})
if ("${existingDate}" STREQUAL "")
LIST(APPEND C2J_LIST "${svc}:${date}")
if ("${svc}" STREQUAL "s3")
LIST(APPEND C2J_LIST "s3-crt:${date}")
endif()
elseif(${existingDate} STRLESS ${date})
LIST(REMOVE_ITEM C2J_LIST "${svc}:${existingDate}")
LIST(APPEND C2J_LIST "${svc}:${date}")
if ("${svc}" STREQUAL "s3")
LIST(REMOVE_ITEM C2J_LIST "s3-crt:${existingDate}")
LIST(APPEND C2J_LIST "s3-crt:${date}")
endif()
endif()
set(LIST_DIRECTORIES true)
file(GLOB ALL_GENERATED_CLIENTS $LIST_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/generated/src/aws-cpp-sdk-*")

foreach(clientDir IN LISTS ALL_GENERATED_CLIENTS)
get_filename_component(clientDirName "${clientDir}" NAME)
STRING(REGEX REPLACE "^aws-cpp-sdk-" "" serviceName "${clientDirName}")
LIST(APPEND SERVICE_CLIENT_LIST "${serviceName}")
endforeach()
set(C2J_LIST "${C2J_LIST}" PARENT_SCOPE)
set(C2J_SPECIAL_NAME_LIST "${C2J_SPECIAL_NAME_LIST}" PARENT_SCOPE)
set(SERVICE_CLIENT_LIST "${SERVICE_CLIENT_LIST}" PARENT_SCOPE)
endfunction()


# A list of so-called "hand-written SDK high-level libraries/components"
set(HIGH_LEVEL_SDK_LIST "")
list(APPEND HIGH_LEVEL_SDK_LIST "access-management")
list(APPEND HIGH_LEVEL_SDK_LIST "identity-management")
Expand All @@ -151,6 +83,7 @@ list(APPEND HIGH_LEVEL_SDK_LIST "transfer")
list(APPEND HIGH_LEVEL_SDK_LIST "s3-encryption")
list(APPEND HIGH_LEVEL_SDK_LIST "text-to-speech")

# A flatmap list of sdk_component:sdk_component_tests,sdk_component_another_tests
set(SDK_TEST_PROJECT_LIST "")
list(APPEND SDK_TEST_PROJECT_LIST "cloudfront:tests/aws-cpp-sdk-cloudfront-integration-tests")
list(APPEND SDK_TEST_PROJECT_LIST "cognito-identity:tests/aws-cpp-sdk-cognitoidentity-integration-tests")
Expand Down Expand Up @@ -184,11 +117,9 @@ build_sdk_list()

if(EXISTS "${CMAKE_SOURCE_DIR}/generated")
if(EXISTS "${CMAKE_SOURCE_DIR}/generated/tests")
foreach(GENERATED_C2J_TEST IN LISTS C2J_LIST)
STRING(REGEX REPLACE "([^:]+):.*" "\\1" GENERATED_C2J_TEST_RESULT ${GENERATED_C2J_TEST})

if(EXISTS "${CMAKE_SOURCE_DIR}/generated/tests/${GENERATED_C2J_TEST_RESULT}-gen-tests")
list(APPEND SDK_TEST_PROJECT_LIST "${GENERATED_C2J_TEST_RESULT}:generated/tests/${GENERATED_C2J_TEST_RESULT}-gen-tests")
foreach(SERVICE_NAME IN LISTS SERVICE_CLIENT_LIST)
if(EXISTS "${CMAKE_SOURCE_DIR}/generated/tests/${SERVICE_NAME}-gen-tests")
list(APPEND SDK_TEST_PROJECT_LIST "${SERVICE_NAME}:generated/tests/${SERVICE_NAME}-gen-tests")
endif()
endforeach()
endif()
Expand All @@ -213,10 +144,7 @@ list(APPEND TEST_DEPENDENCY_LIST "text-to-speech:polly,core")
list(APPEND TEST_DEPENDENCY_LIST "transfer:s3,core")
list(APPEND TEST_DEPENDENCY_LIST "logs:access-management,cognito-identity,iam,core")

# make a list of the generated clients
set(GENERATED_SERVICE_LIST "")
foreach(GENERATED_C2J_SERVICE IN LISTS C2J_LIST)
STRING(REGEX REPLACE "([^:]+):.*" "\\1" SERVICE_RESULT ${GENERATED_C2J_SERVICE})
list(APPEND GENERATED_SERVICE_LIST ${SERVICE_RESULT})
list(APPEND SDK_DEPENDENCY_LIST "${SERVICE_RESULT}:core")
set(GENERATED_SERVICE_LIST ${SERVICE_CLIENT_LIST})
foreach(SERVICE_NAME IN LISTS SERVICE_CLIENT_LIST)
list(APPEND SDK_DEPENDENCY_LIST "${SERVICE_NAME}:core")
endforeach()
19 changes: 9 additions & 10 deletions generated/smoke-tests/codepipeline/CodePipelineSmokeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <aws/testing/AwsTestHelpers.h>
#include <aws/codepipeline/CodePipelineClient.h>
#include <aws/codepipeline/model/GetPipelineRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/codepipeline/model/ListPipelinesRequest.h>

namespace CodePipelineSmokeTest{
Expand All @@ -32,7 +31,7 @@ class CodePipelineSmokeTestSuite : public Aws::Testing::AwsCppSdkGTestSuite {
static const char ALLOCATION_TAG[];
};
const char CodePipelineSmokeTestSuite::ALLOCATION_TAG[] = "CodePipelineSmokeTest";
TEST_F(CodePipelineSmokeTestSuite, ListPipelinesSuccess )
TEST_F(CodePipelineSmokeTestSuite, GetPipelineFailure )
{
Aws::CodePipeline::CodePipelineClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -41,11 +40,12 @@ TEST_F(CodePipelineSmokeTestSuite, ListPipelinesSuccess )
auto clientSp = Aws::MakeShared<CodePipelineClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

ListPipelinesRequest input;
auto outcome = clientSp->ListPipelines(input);
EXPECT_TRUE( outcome.IsSuccess());
GetPipelineRequest input;
input.SetName("fake-pipeline");
auto outcome = clientSp->GetPipeline(input);
EXPECT_FALSE( outcome.IsSuccess());
}
TEST_F(CodePipelineSmokeTestSuite, GetPipelineFailure )
TEST_F(CodePipelineSmokeTestSuite, ListPipelinesSuccess )
{
Aws::CodePipeline::CodePipelineClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -54,9 +54,8 @@ TEST_F(CodePipelineSmokeTestSuite, GetPipelineFailure )
auto clientSp = Aws::MakeShared<CodePipelineClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

GetPipelineRequest input;
input.SetName("fake-pipeline");
auto outcome = clientSp->GetPipeline(input);
EXPECT_FALSE( outcome.IsSuccess());
ListPipelinesRequest input;
auto outcome = clientSp->ListPipelines(input);
EXPECT_TRUE( outcome.IsSuccess());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DirectoryServiceDataSmokeTestSuite : public Aws::Testing::AwsCppSdkGTestSu
static const char ALLOCATION_TAG[];
};
const char DirectoryServiceDataSmokeTestSuite::ALLOCATION_TAG[] = "DirectoryServiceDataSmokeTest";
TEST_F(DirectoryServiceDataSmokeTestSuite, DescribeGroupFailure )
TEST_F(DirectoryServiceDataSmokeTestSuite, DescribeUserFailure )
{
Aws::DirectoryServiceData::DirectoryServiceDataClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -41,13 +41,13 @@ TEST_F(DirectoryServiceDataSmokeTestSuite, DescribeGroupFailure )
auto clientSp = Aws::MakeShared<DirectoryServiceDataClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

DescribeGroupRequest input;
DescribeUserRequest input;
input.SetDirectoryId("d-1111111111");
input.SetSAMAccountName("test-group");
auto outcome = clientSp->DescribeGroup(input);
input.SetSAMAccountName("test-user");
auto outcome = clientSp->DescribeUser(input);
EXPECT_FALSE( outcome.IsSuccess());
}
TEST_F(DirectoryServiceDataSmokeTestSuite, DescribeUserFailure )
TEST_F(DirectoryServiceDataSmokeTestSuite, DescribeGroupFailure )
{
Aws::DirectoryServiceData::DirectoryServiceDataClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -56,10 +56,10 @@ TEST_F(DirectoryServiceDataSmokeTestSuite, DescribeUserFailure )
auto clientSp = Aws::MakeShared<DirectoryServiceDataClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

DescribeUserRequest input;
DescribeGroupRequest input;
input.SetDirectoryId("d-1111111111");
input.SetSAMAccountName("test-user");
auto outcome = clientSp->DescribeUser(input);
input.SetSAMAccountName("test-group");
auto outcome = clientSp->DescribeGroup(input);
EXPECT_FALSE( outcome.IsSuccess());
}
}
19 changes: 9 additions & 10 deletions generated/smoke-tests/kinesis/KinesisSmokeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <aws/kinesis/KinesisClient.h>
#include <aws/kinesis/model/ListStreamsRequest.h>
#include <aws/kinesis/model/DescribeStreamRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace KinesisSmokeTest{
using namespace Aws::Auth;
Expand All @@ -32,7 +31,7 @@ class KinesisSmokeTestSuite : public Aws::Testing::AwsCppSdkGTestSuite {
static const char ALLOCATION_TAG[];
};
const char KinesisSmokeTestSuite::ALLOCATION_TAG[] = "KinesisSmokeTest";
TEST_F(KinesisSmokeTestSuite, ListStreamsSuccess )
TEST_F(KinesisSmokeTestSuite, DescribeStreamFailure )
{
Aws::Kinesis::KinesisClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -41,11 +40,12 @@ TEST_F(KinesisSmokeTestSuite, ListStreamsSuccess )
auto clientSp = Aws::MakeShared<KinesisClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

ListStreamsRequest input;
auto outcome = clientSp->ListStreams(input);
EXPECT_TRUE( outcome.IsSuccess());
DescribeStreamRequest input;
input.SetStreamName("bogus-stream-name");
auto outcome = clientSp->DescribeStream(input);
EXPECT_FALSE( outcome.IsSuccess());
}
TEST_F(KinesisSmokeTestSuite, DescribeStreamFailure )
TEST_F(KinesisSmokeTestSuite, ListStreamsSuccess )
{
Aws::Kinesis::KinesisClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -54,9 +54,8 @@ TEST_F(KinesisSmokeTestSuite, DescribeStreamFailure )
auto clientSp = Aws::MakeShared<KinesisClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

DescribeStreamRequest input;
input.SetStreamName("bogus-stream-name");
auto outcome = clientSp->DescribeStream(input);
EXPECT_FALSE( outcome.IsSuccess());
ListStreamsRequest input;
auto outcome = clientSp->ListStreams(input);
EXPECT_TRUE( outcome.IsSuccess());
}
}
21 changes: 11 additions & 10 deletions generated/smoke-tests/logs/CloudWatchLogsSmokeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <aws/logs/model/DescribeLogGroupsRequest.h>
#include <aws/logs/model/GetLogEventsRequest.h>
#include <aws/logs/CloudWatchLogsClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace CloudWatchLogsSmokeTest{
using namespace Aws::Auth;
Expand All @@ -31,7 +32,7 @@ class CloudWatchLogsSmokeTestSuite : public Aws::Testing::AwsCppSdkGTestSuite {
static const char ALLOCATION_TAG[];
};
const char CloudWatchLogsSmokeTestSuite::ALLOCATION_TAG[] = "CloudWatchLogsSmokeTest";
TEST_F(CloudWatchLogsSmokeTestSuite, GetLogEventsFailure )
TEST_F(CloudWatchLogsSmokeTestSuite, DescribeLogGroupsSuccess )
{
Aws::CloudWatchLogs::CloudWatchLogsClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -40,13 +41,11 @@ TEST_F(CloudWatchLogsSmokeTestSuite, GetLogEventsFailure )
auto clientSp = Aws::MakeShared<CloudWatchLogsClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

GetLogEventsRequest input;
input.SetLogGroupName("fakegroup");
input.SetLogStreamName("fakestream");
auto outcome = clientSp->GetLogEvents(input);
EXPECT_FALSE( outcome.IsSuccess());
DescribeLogGroupsRequest input;
auto outcome = clientSp->DescribeLogGroups(input);
EXPECT_TRUE( outcome.IsSuccess());
}
TEST_F(CloudWatchLogsSmokeTestSuite, DescribeLogGroupsSuccess )
TEST_F(CloudWatchLogsSmokeTestSuite, GetLogEventsFailure )
{
Aws::CloudWatchLogs::CloudWatchLogsClientConfiguration clientConfiguration;
clientConfiguration.region = "us-west-2";
Expand All @@ -55,8 +54,10 @@ TEST_F(CloudWatchLogsSmokeTestSuite, DescribeLogGroupsSuccess )
auto clientSp = Aws::MakeShared<CloudWatchLogsClient>(ALLOCATION_TAG, clientConfiguration);
//populate input params

DescribeLogGroupsRequest input;
auto outcome = clientSp->DescribeLogGroups(input);
EXPECT_TRUE( outcome.IsSuccess());
GetLogEventsRequest input;
input.SetLogGroupName("fakegroup");
input.SetLogStreamName("fakestream");
auto outcome = clientSp->GetLogEvents(input);
EXPECT_FALSE( outcome.IsSuccess());
}
}
Loading

0 comments on commit 1aef2a8

Please sign in to comment.