Fixed AV in attestation tests (#4480)
* Fixed AV in attestation tests * Fixed another test AV
This commit is contained in:
parent
779c268a7f
commit
b4be76fec8
@ -53,7 +53,10 @@ namespace Azure { namespace Security { namespace Attestation { namespace Test {
|
||||
virtual void TearDown() override
|
||||
{
|
||||
// Reset the attestation policy for this instance back to the default.
|
||||
m_adminClient->ResetAttestationPolicy(AttestationType::Tpm);
|
||||
if (m_adminClient)
|
||||
{
|
||||
m_adminClient->ResetAttestationPolicy(AttestationType::Tpm);
|
||||
}
|
||||
|
||||
// Make sure you call the base classes TearDown method to ensure recordings are made.
|
||||
TestBase::TearDown();
|
||||
|
||||
@ -16,12 +16,15 @@ void Azure::Core::Test::TestBase::TearDown()
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_testProxy->IsRecordMode())
|
||||
if (m_testProxy)
|
||||
{
|
||||
m_testProxy->StopPlaybackRecord(TestMode::RECORD);
|
||||
}
|
||||
if (m_testProxy->IsPlaybackMode())
|
||||
{
|
||||
m_testProxy->StopPlaybackRecord(TestMode::PLAYBACK);
|
||||
if (m_testProxy->IsRecordMode())
|
||||
{
|
||||
m_testProxy->StopPlaybackRecord(TestMode::RECORD);
|
||||
}
|
||||
if (m_testProxy->IsPlaybackMode())
|
||||
{
|
||||
m_testProxy->StopPlaybackRecord(TestMode::PLAYBACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,8 +268,11 @@ namespace Azure { namespace Core { namespace Test {
|
||||
auto response = m_pipeline->Send(request, Azure::Core::Context::ApplicationContext);
|
||||
checkResponseCode(response->GetStatusCode());
|
||||
|
||||
auto expectedResponseBodySize = std::stoull(response->GetHeaders().at("content-length"));
|
||||
CheckBodyFromStream(*response, expectedResponseBodySize);
|
||||
if (response->GetStatusCode() == Http::HttpStatusCode::Ok)
|
||||
{
|
||||
auto expectedResponseBodySize = std::stoull(response->GetHeaders().at("content-length"));
|
||||
CheckBodyFromStream(*response, expectedResponseBodySize);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(TransportAdapter, getChunkWithStream)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user