Silence aws logging for unit test and have a new AWSNativeSDK as entry point for test env (#6865)

* Silence aws logging for unit test
* Create a new AWSNativeSDK entry point for test environment only
* Update naming for target and file
This commit is contained in:
Vincent Liu
2022-01-19 12:11:39 -08:00
committed by GitHub
parent 57394bc81d
commit 5cac67bfad
12 changed files with 130 additions and 18 deletions
@@ -30,7 +30,7 @@
#include <AWSCoreBus.h>
#include <ResourceMapping/AWSResourceMappingBus.h>
#include <AWSClientAuthBus.h>
#include <AWSNativeSDKInit/AWSNativeSDKInit.h>
#include <AWSNativeSDKTestManager.h>
#include <HttpRequestor/HttpRequestorBus.h>
#include <aws/core/utils/Outcome.h>
@@ -542,7 +542,7 @@ namespace AWSClientAuthUnitTest
m_jobContext.reset(aznew AZ::JobContext(*m_jobManager, *m_jobCancelGroup));
AZ::JobContext::SetGlobalContext(m_jobContext.get());
AWSNativeSDKInit::InitializationManager::InitAwsApi();
AWSNativeSDKTestLibs::AWSNativeSDKTestManager::Init();
m_cognitoIdentityProviderClientMock = std::make_shared<CognitoIdentityProviderClientMock>();
m_cognitoIdentityClientMock = std::make_shared<CognitoIdentityClientMock>();
}
@@ -557,8 +557,7 @@ namespace AWSClientAuthUnitTest
m_cognitoIdentityProviderClientMock.reset();
m_cognitoIdentityClientMock.reset();
AWSNativeSDKInit::InitializationManager::Shutdown();
AWSNativeSDKTestLibs::AWSNativeSDKTestManager::Shutdown();
AZ::AllocatorInstance<AZ::ThreadPoolAllocator>::Destroy();