Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "cpp",
"TagPrefix": "cpp/storage",
"Tag": "cpp/storage_925cef0316"
"Tag": "cpp/storage_92d8f38118"
}
12 changes: 9 additions & 3 deletions sdk/storage/azure-storage-files-shares/src/rest_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1652,9 +1652,15 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares {
}
}
}
response.ETag = ETag(pRawResponse->GetHeaders().at("ETag"));
response.LastModified = DateTime::Parse(
pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123);
if (pRawResponse->GetHeaders().count("ETag") != 0)
{
response.ETag = ETag(pRawResponse->GetHeaders().at("ETag"));
}
if (pRawResponse->GetHeaders().count("Last-Modified") != 0)
{
response.LastModified = DateTime::Parse(
pRawResponse->GetHeaders().at("Last-Modified"), Azure::DateTime::DateFormat::Rfc1123);
}
return Response<Models::ShareStatistics>(std::move(response), std::move(pRawResponse));
}
Response<Models::CreateDirectoryResult> DirectoryClient::Create(
Expand Down
4 changes: 4 additions & 0 deletions sdk/storage/azure-storage-files-shares/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ directive:
- from: swagger-document
where: $["x-ms-paths"]["/{shareName}?restype=share&comp=stats"].get.responses["200"]
transform: >
$.headers["ETag"]["x-ms-client-default"] = "";
$.headers["ETag"]["x-nullable"] = true;
$.headers["Last-Modified"]["x-ms-client-default"] = "";
$.headers["Last-Modified"]["x-nullable"] = true;
$.schema = {
"description": "Stats for the share.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(FileShareClientTest, GetStatistics) { EXPECT_NO_THROW(m_shareClient->GetStatistics()); }

TEST_F(FileShareClientTest, PremiumShare)
{
auto shareClientOptions = InitClientOptions<Files::Shares::ShareClientOptions>();
Expand Down