remove some items from filter blob result (#1504)

This commit is contained in:
JinmingHu 2021-01-28 16:32:51 +08:00 committed by GitHub
parent 98b15b820e
commit ec9d35ae8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 25 deletions

View File

@ -21,6 +21,7 @@
- Removed `PreviousContinuationToken` from `ListBlobContainersSinglePageResult`, `ListBlobsByHierarchySinglePageResult` and `ListBlobsSinglePageResult`.
- `ListBlobContainersIncludeItem` was renamed to `ListBlobContainersIncludeFlags`.
- `ListBlobsIncludeItem` was renamed to `ListBlobsIncludeFlags`.
- Removed `TagValue` from `FilterBlobItem`, removed `Where` from `FindBlobsByTagsSinglePageResult`.
## 12.0.0-beta.6 (2020-01-14)

View File

@ -422,7 +422,6 @@ namespace Azure { namespace Storage { namespace Blobs {
{
std::string BlobName;
std::string BlobContainerName;
std::string TagValue;
}; // struct FilterBlobItem
struct GetBlobTagsResult
@ -783,7 +782,6 @@ namespace Azure { namespace Storage { namespace Blobs {
{
std::string RequestId;
std::string ServiceEndpoint;
std::string Where;
Azure::Core::Nullable<std::string> ContinuationToken;
std::vector<FilterBlobItem> Items;
}; // struct FindBlobsByTagsSinglePageResult
@ -1565,7 +1563,6 @@ namespace Azure { namespace Storage { namespace Blobs {
enum class XmlTagName
{
k_EnumerationResults,
k_Where,
k_NextMarker,
k_Blobs,
k_Blob,
@ -1596,10 +1593,6 @@ namespace Azure { namespace Storage { namespace Blobs {
{
path.emplace_back(XmlTagName::k_EnumerationResults);
}
else if (std::strcmp(node.Name, "Where") == 0)
{
path.emplace_back(XmlTagName::k_Where);
}
else if (std::strcmp(node.Name, "NextMarker") == 0)
{
path.emplace_back(XmlTagName::k_NextMarker);
@ -1626,12 +1619,6 @@ namespace Azure { namespace Storage { namespace Blobs {
else if (node.Type == Storage::Details::XmlNodeType::Text)
{
if (path.size() == 2 && path[0] == XmlTagName::k_EnumerationResults
&& path[1] == XmlTagName::k_Where)
{
ret.Where = node.Value;
}
else if (
path.size() == 2 && path[0] == XmlTagName::k_EnumerationResults
&& path[1] == XmlTagName::k_NextMarker)
{
ret.ContinuationToken = node.Value;
@ -2644,7 +2631,6 @@ namespace Azure { namespace Storage { namespace Blobs {
{
k_Name,
k_ContainerName,
k_TagValue,
k_Unknown,
};
std::vector<XmlTagName> path;
@ -2676,10 +2662,6 @@ namespace Azure { namespace Storage { namespace Blobs {
{
path.emplace_back(XmlTagName::k_ContainerName);
}
else if (std::strcmp(node.Name, "TagValue") == 0)
{
path.emplace_back(XmlTagName::k_TagValue);
}
else
{
path.emplace_back(XmlTagName::k_Unknown);
@ -2695,10 +2677,6 @@ namespace Azure { namespace Storage { namespace Blobs {
{
ret.BlobContainerName = node.Value;
}
else if (path.size() == 1 && path[0] == XmlTagName::k_TagValue)
{
ret.TagValue = node.Value;
}
}
}
return ret;

View File

@ -778,14 +778,12 @@ namespace Azure { namespace Storage { namespace Test {
}
auto findBlobsRet = *blobServiceClient.FindBlobsByTagsSinglePage(whereExpression, options);
EXPECT_FALSE(findBlobsRet.ServiceEndpoint.empty());
EXPECT_EQ(findBlobsRet.Where, whereExpression);
options.ContinuationToken = findBlobsRet.ContinuationToken;
for (auto& item : findBlobsRet.Items)
{
EXPECT_FALSE(item.BlobName.empty());
EXPECT_FALSE(item.BlobContainerName.empty());
EXPECT_FALSE(item.TagValue.empty());
findResults.emplace_back(std::move(item));
}
} while (!marker.empty());
@ -802,7 +800,6 @@ namespace Azure { namespace Storage { namespace Test {
ASSERT_FALSE(findResults.empty());
EXPECT_EQ(findResults[0].BlobName, blobName);
EXPECT_EQ(findResults[0].BlobContainerName, m_containerName);
EXPECT_FALSE(findResults[0].TagValue.empty());
}
TEST_F(BlobContainerClientTest, DISABLED_AccessConditionTags)