Skip to content
Open
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_81cefdec1b"
"Tag": "cpp/storage_4783f09bdf"
}
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_EQ(blobContent.size(), properties.BlobSize);
}

TEST_F(AppendBlobClientTest, OAuthAppendBlockFromUri_SourceFileShare_PLAYBACKONLY_)
TEST_F(AppendBlobClientTest, OAuthAppendBlockFromUri_SourceFileShare)
{
auto shareClientOptions = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
shareClientOptions.ShareTokenIntent = Files::Shares::Models::ShareTokenIntent::Backup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ namespace Azure { namespace Storage { namespace Test {
containerClient.DeleteIfExists();
}

TEST_F(BlobContainerClientTest, AclAndAccountInfoOAuth_PLAYBACKONLY_)
TEST_F(BlobContainerClientTest, AclAndAccountInfoOAuth)
{
auto credential = GetTestCredential();
auto clientOptions = InitStorageClientOptions<Blobs::BlobClientOptions>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_FALSE(blobItem.Details.IncrementalCopyDestinationSnapshot.HasValue());
}

TEST_F(BlockBlobClientTest, OAuthCopyFromUri_SourceFileShare_PLAYBACKONLY_)
TEST_F(BlockBlobClientTest, OAuthCopyFromUri_SourceFileShare)
{
auto shareClientOptions = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
shareClientOptions.ShareTokenIntent = Files::Shares::Models::ShareTokenIntent::Backup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ namespace Azure { namespace Storage { namespace Test {
pageBlobClient.Download().Value.BodyStream->ReadToEnd());
}

TEST_F(PageBlobClientTest, OAuthUploadFromUri_SourceFileShare_PLAYBACKONLY_)
TEST_F(PageBlobClientTest, OAuthUploadFromUri_SourceFileShare)
{
auto shareClientOptions = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
shareClientOptions.ShareTokenIntent = Files::Shares::Models::ShareTokenIntent::Backup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(DataLakeFileSystemClientTest, AclOAuth_PLAYBACKONLY_)
TEST_F(DataLakeFileSystemClientTest, AclOAuth)
{
auto credential = GetTestCredential();
auto clientOptions = InitStorageClientOptions<Files::DataLake::DataLakeClientOptions>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(DataLakeServiceClientTest, ListSystemFileSystems_PLAYBACKONLY_)
TEST_F(DataLakeServiceClientTest, ListSystemFileSystems)
{
// Disabled temporarily because the test account on the pipeline hasn't system fileSystems.
// List system type FileSystems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(FileShareClientTest, OAuth_PLAYBACKONLY_)
TEST_F(FileShareClientTest, OAuth)
{
auto credential = GetTestCredential();
auto options = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
Expand Down Expand Up @@ -735,7 +735,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_TRUE(client1.GetUrl().find("snapshot=" + timestamp2) == std::string::npos);
}

TEST_F(FileShareClientTest, Audience_PLAYBACKONLY_)
TEST_F(FileShareClientTest, Audience)
{
auto credential = GetTestCredential();
auto clientOptions = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
Expand Down Expand Up @@ -764,7 +764,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_THROW(shareClient.GetPermission(created.FilePermissionKey), StorageException);
}

TEST_F(FileShareClientTest, EnableSnapshotVirtualDirectoryAccess_PLAYBACKONLY_)
TEST_F(FileShareClientTest, EnableSnapshotVirtualDirectoryAccess)
{
std::string shareName = LowercaseRandomString();
auto shareClient = GetPremiumShareClientForTest(shareName);
Expand All @@ -790,7 +790,7 @@ namespace Azure { namespace Storage { namespace Test {
&& !properties.EnableSnapshotVirtualDirectoryAccess.Value());
}

TEST_F(FileShareClientTest, FilePermissionFormat_PLAYBACKONLY_)
TEST_F(FileShareClientTest, FilePermissionFormat)
{
auto sddlPermission
= "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ namespace Azure { namespace Storage { namespace Test {
testTrailingDot(false, false);
}

TEST_F(FileShareDirectoryClientTest, OAuth_PLAYBACKONLY_)
TEST_F(FileShareDirectoryClientTest, OAuth)
{
const std::string directoryName = RandomString();

Expand Down Expand Up @@ -1232,7 +1232,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_THROW(directoryClient.GetProperties(), StorageException);
}

TEST_F(FileShareDirectoryClientTest, FilePermissionFormat_PLAYBACKONLY_)
TEST_F(FileShareDirectoryClientTest, FilePermissionFormat)
{
auto sddlPermission
= "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-"
Expand Down Expand Up @@ -1378,7 +1378,7 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(FileShareDirectoryClientTest, PremiumNfsProperties_PLAYBACKONLY_)
TEST_F(FileShareDirectoryClientTest, PremiumNfsProperties)
{
auto shareServiceClient = *m_premiumShareServiceClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ namespace Azure { namespace Storage { namespace Test {
testTrailingDot(false);
}

TEST_F(FileShareFileClientTest, OAuth_PLAYBACKONLY_)
TEST_F(FileShareFileClientTest, OAuth)
{
const std::string fileName = RandomString();

Expand Down Expand Up @@ -1824,7 +1824,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_NO_THROW(fileClient1.GetProperties());
}

TEST_F(FileShareFileClientTest, OAuthCopy_PLAYBACKONLY_)
TEST_F(FileShareFileClientTest, OAuthCopy)
{
const std::string fileName = RandomString();

Expand Down Expand Up @@ -1911,7 +1911,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_TRUE(client1.GetUrl().find("snapshot=" + timestamp2) == std::string::npos);
}

TEST_F(FileShareFileClientTest, Audience_PLAYBACKONLY_)
TEST_F(FileShareFileClientTest, Audience)
{
auto credential = GetTestCredential();
auto clientOptions = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
Expand Down Expand Up @@ -1987,7 +1987,7 @@ namespace Azure { namespace Storage { namespace Test {
EXPECT_EQ(xorAccessRights, accessRightsA ^ accessRightsB);
}

TEST_F(FileShareFileClientTest, FilePermissionFormat_PLAYBACKONLY_)
TEST_F(FileShareFileClientTest, FilePermissionFormat)
{
auto sddlPermission
= "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-"
Expand Down Expand Up @@ -2117,7 +2117,7 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(FileShareFileClientTest, FilePermissionFormatForCopy_PLAYBACKONLY_)
TEST_F(FileShareFileClientTest, FilePermissionFormatForCopy)
{
auto sddlPermission
= "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-"
Expand Down Expand Up @@ -2211,7 +2211,7 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(FileShareFileClientTest, PremiumPosixProperties_PLAYBACKONLY_)
TEST_F(FileShareFileClientTest, PremiumPosixProperties)
{
auto shareServiceClient = *m_premiumShareServiceClient;

Expand Down Expand Up @@ -2467,7 +2467,7 @@ namespace Azure { namespace Storage { namespace Test {
Files::Shares::Models::NfsFileType::Regular);
}

TEST_F(FileShareFileClientTest, PremiumPosixPropertiesForCopy_PLAYBACKONLY_)
TEST_F(FileShareFileClientTest, PremiumPosixPropertiesForCopy)
{
auto shareServiceClient = *m_premiumShareServiceClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ namespace Azure { namespace Storage { namespace Test {
}

// Most APIs don't work for premium shares
if (m_useTokenCredentialByDefault)
{
m_premiumShareServiceClient = std::make_shared<Files::Shares::ShareServiceClient>(
GetPremiumShareServiceUrl(), GetTestCredential(), options);
}
else
{
std::string premiumConnectionString;
try
Expand All @@ -58,11 +64,26 @@ namespace Azure { namespace Storage { namespace Test {
Files::Shares::ShareClientOptions clientOptions)
{
InitStorageClientOptions(clientOptions);
auto shareClient = Files::Shares::ShareClient::CreateFromConnectionString(
PremiumFileConnectionString(), shareName, clientOptions);
m_resourceCleanupFunctions.push_back([shareClient]() { shareClient.DeleteIfExists(); });

return shareClient;
if (m_useTokenCredentialByDefault)
{
if (!clientOptions.ShareTokenIntent.HasValue())
{
clientOptions.ShareTokenIntent
= Azure::Storage::Files::Shares::Models::ShareTokenIntent::Backup;
}
auto shareServiceClient = std::make_shared<Files::Shares::ShareServiceClient>(
GetPremiumShareServiceUrl(), GetTestCredential(), clientOptions);
auto shareClient = shareServiceClient->GetShareClient(shareName);
m_resourceCleanupFunctions.push_back([shareClient]() { shareClient.DeleteIfExists(); });
return shareClient;
}
else
{
auto shareClient = Files::Shares::ShareClient::CreateFromConnectionString(
PremiumFileConnectionString(), shareName, clientOptions);
m_resourceCleanupFunctions.push_back([shareClient]() { shareClient.DeleteIfExists(); });
return shareClient;
}
}

TEST_F(FileShareServiceClientTest, Constructors_LIVEONLY_)
Expand Down Expand Up @@ -171,7 +192,7 @@ namespace Azure { namespace Storage { namespace Test {
}
}

TEST_F(FileShareServiceClientTest, ListSharesEnableSnapshotVirtualDirectoryAccess_PLAYBACKONLY_)
TEST_F(FileShareServiceClientTest, ListSharesEnableSnapshotVirtualDirectoryAccess)
{
auto premiumFileShareServiceClient = *m_premiumShareServiceClient;
std::string shareName1 = LowercaseRandomString();
Expand Down Expand Up @@ -419,7 +440,7 @@ namespace Azure { namespace Storage { namespace Test {
premiumFileShareServiceClient.SetProperties(originalProperties);
}

TEST_F(FileShareServiceClientTest, OAuth_PLAYBACKONLY_)
TEST_F(FileShareServiceClientTest, OAuth)
{
auto credential = GetTestCredential();
auto options = InitStorageClientOptions<Files::Shares::ShareClientOptions>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ namespace Azure { namespace Storage { namespace Test {
queueClient.Delete();
}

TEST_F(QueueClientTest, AclOAuth_PLAYBACKONLY_)
TEST_F(QueueClientTest, AclOAuth)
{
auto credential = GetTestCredential();
auto clientOptions = InitStorageClientOptions<Queues::QueueClientOptions>();
Expand Down
Loading