headers sanitize (#5518)
* headers sanitize * test-proxy client id * Liveonly storage tests and a couple of disables * typo * cover --------- Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
parent
e148d89745
commit
c7f2767d6a
@ -242,11 +242,20 @@ void TestProxyManager::SetProxySanitizer()
|
||||
|
||||
addSanitizer(SanitizerType::General, g_accountRegex, "account");
|
||||
addSanitizer(SanitizerType::Body, "client_secret=(?<clientsecret>[^&]+)", "clientsecret");
|
||||
addSanitizer(SanitizerType::Body, "client_id=(?<clientid>[^&]+)", "clientid");
|
||||
const std::string storageSasSignatureRegex = "\\?.*sig=(?<sassig>[a-zA-Z0-9\\%\\/+=]+)";
|
||||
addSanitizer(SanitizerType::Uri, storageSasSignatureRegex, "sassig");
|
||||
addSanitizer(SanitizerType::Header, storageSasSignatureRegex, "sassig", "x-ms-copy-source");
|
||||
addSanitizer(SanitizerType::Header, storageSasSignatureRegex, "sassig", "x-ms-rename-source");
|
||||
addSanitizer(SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-copy-source-authorization");
|
||||
addSanitizer(SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-encryption-key");
|
||||
addSanitizer(SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-rename-source");
|
||||
addSanitizer(SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-file-rename-source");
|
||||
addSanitizer(SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-copy-source");
|
||||
addSanitizer(SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-copy-source-authorization");
|
||||
addSanitizer(
|
||||
SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-file-rename-source-authorization");
|
||||
addSanitizer(SanitizerType::Header, "(?<auth>.+)", "auth", "x-ms-encryption-key-sha256");
|
||||
addSanitizer(SanitizerType::Header, "(?<cookie>.+)", "cookie", "Cookie");
|
||||
addSanitizer(SanitizerType::Header, "(?<cookie>.+)", "cookie", "Set-Cookie");
|
||||
const std::string storageUserDelegationKeyRegex
|
||||
|
||||
@ -35,4 +35,4 @@ additional questions or comments.
|
||||
[cla]: https://cla.microsoft.com
|
||||
[coc]: https://opensource.microsoft.com/codeofconduct/
|
||||
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
|
||||
[coc_contact]: mailto:opencode@microsoft.com
|
||||
[coc_contact]: mailto:opencode@microsoft.com
|
||||
|
||||
@ -616,7 +616,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(BlobContainerClientTest, CustomerProvidedKey)
|
||||
TEST_F(BlobContainerClientTest, CustomerProvidedKey_LIVEONLY_)
|
||||
{
|
||||
auto sourceContainerClient = *m_blobContainerClient;
|
||||
|
||||
|
||||
@ -322,7 +322,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DataLakeFileSystemClientTest, CustomerProvidedKey)
|
||||
TEST_F(DataLakeFileSystemClientTest, CustomerProvidedKey_LIVEONLY_)
|
||||
{
|
||||
auto getRandomCustomerProvidedKey = [&]() {
|
||||
Files::DataLake::EncryptionKey key;
|
||||
|
||||
@ -120,7 +120,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(FileShareDirectoryClientTest, RenameFile)
|
||||
TEST_F(FileShareDirectoryClientTest, RenameFile_LIVEONLY_)
|
||||
{
|
||||
const std::string baseName = RandomString();
|
||||
const std::string baseDirectoryName = baseName + "1";
|
||||
@ -285,7 +285,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(FileShareDirectoryClientTest, RenameSubdirectory)
|
||||
TEST_F(FileShareDirectoryClientTest, RenameSubdirectory_LIVEONLY_)
|
||||
{
|
||||
const std::string baseName = RandomString();
|
||||
const std::string baseDirectoryName = baseName + "1";
|
||||
@ -999,7 +999,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
testTrailingDot(false);
|
||||
}
|
||||
|
||||
TEST_F(FileShareDirectoryClientTest, RenameAllowTrailingDot)
|
||||
TEST_F(FileShareDirectoryClientTest, RenameAllowTrailingDot_LIVEONLY_)
|
||||
{
|
||||
const std::string directoryNameWithTrailingDot = RandomString() + ".";
|
||||
const std::string connectionString = StandardStorageConnectionString();
|
||||
@ -1099,7 +1099,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
testTrailingDot(false, false);
|
||||
}
|
||||
|
||||
TEST_F(FileShareDirectoryClientTest, OAuth_PLAYBACKONLY_)
|
||||
TEST_F(FileShareDirectoryClientTest, DISABLED_OAuth)
|
||||
{
|
||||
const std::string directoryName = RandomString();
|
||||
|
||||
|
||||
@ -901,7 +901,7 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(FileShareFileClientTest, GetRangeListDiffWithRename_PLAYBACKONLY_)
|
||||
TEST_F(FileShareFileClientTest, DISABLED_GetRangeListDiffWithRename)
|
||||
{
|
||||
size_t rangeSize = 128;
|
||||
std::vector<uint8_t> rangeContent = RandomBuffer(rangeSize);
|
||||
|
||||
@ -29,7 +29,7 @@ extends:
|
||||
# Not running tests on CI but only on LiveTest mode
|
||||
CtestRegex: azure-storage
|
||||
LineCoverageTarget: 85
|
||||
BranchCoverageTarget: 50
|
||||
BranchCoverageTarget: 49
|
||||
LiveTestCtestRegex: azure-storage
|
||||
Clouds: Preview
|
||||
SupportedClouds: Preview
|
||||
|
||||
Loading…
Reference in New Issue
Block a user