Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit efbf424

Browse files
will-tongvinjiang
authored andcommitted
fix invalid account key access in test
1 parent 9b09483 commit efbf424

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Microsoft.WindowsAzure.Storage/tests/cloud_storage_account_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ void check_credentials_equal(const azure::storage::storage_credentials& a, const
4242
CHECK_EQUAL(a.is_sas(), b.is_sas());
4343
CHECK_EQUAL(a.is_shared_key(), b.is_shared_key());
4444
CHECK_UTF8_EQUAL(a.account_name(), b.account_name());
45-
CHECK_UTF8_EQUAL(utility::conversions::to_base64(a.account_key()), utility::conversions::to_base64(b.account_key()));
45+
if (a.is_shared_key() && b.is_shared_key()) {
46+
CHECK_UTF8_EQUAL(utility::conversions::to_base64(a.account_key()), utility::conversions::to_base64(b.account_key()));
47+
}
4648
}
4749

4850
void check_account_equal(azure::storage::cloud_storage_account& a, azure::storage::cloud_storage_account& b)

0 commit comments

Comments
 (0)