diff --git a/Blob/Changelog.txt b/Blob/Changelog.txt index 215191277..b5f9fde48 100644 --- a/Blob/Changelog.txt +++ b/Blob/Changelog.txt @@ -1,3 +1,8 @@ +Changes in 11.2.0: + +- Updated REST version to 2019-07-07. +- Added support for encryption scope. + Changes in 11.1.7: - None. diff --git a/Blob/README.md b/Blob/README.md index 45691a72f..c73d75b22 100644 --- a/Blob/README.md +++ b/Blob/README.md @@ -1,4 +1,4 @@ -# Microsoft Azure Storage Blob SDK for .NET (11.1.7) +# Microsoft Azure Storage Blob SDK for .NET (11.2.0) The Microsoft Azure Storage Blob SDK for .NET allows you to build Azure applications that take advantage of scalable cloud computing resources. diff --git a/Common/README.md b/Common/README.md index 6aacc09a4..2cb9ac537 100644 --- a/Common/README.md +++ b/Common/README.md @@ -1,4 +1,4 @@ -# Microsoft Azure Storage Common SDK for .NET (11.1.7) +# Microsoft Azure Storage Common SDK for .NET (11.2.0) The Microsoft Azure Storage Common SDK for .NET is referenced by Azure Storage Blob/Queue/File SDKs and Azure CosmosDB Table SDK and should not be referenced directly by your application. diff --git a/Common/changelog.txt b/Common/changelog.txt index e4d1dfd9c..888da2a64 100644 --- a/Common/changelog.txt +++ b/Common/changelog.txt @@ -1,3 +1,7 @@ +Changes in 11.2.0: + +- Updated REST version to 2019-07-07.. + Changes in 11.1.7: - None. diff --git a/File/Changelog.txt b/File/Changelog.txt index 431c9df46..07695d275 100644 --- a/File/Changelog.txt +++ b/File/Changelog.txt @@ -1,3 +1,8 @@ +Changes in 11.2.0: + +- Updated REST version to 2019-07-07. +- Added support for preserving SMB permissions and properties in file copying. + Changes in 11.1.7: - None. diff --git a/File/README.md b/File/README.md index 8b1a74610..bd75bac69 100644 --- a/File/README.md +++ b/File/README.md @@ -1,4 +1,4 @@ -# Microsoft Azure Storage File SDK for .NET (11.1.7) +# Microsoft Azure Storage File SDK for .NET (11.2.0) The Microsoft Azure Storage File SDK for .NET allows you to build Azure applications that take advantage of scalable cloud computing resources. diff --git a/Lib/Common.Split/NetFx/Properties/AssemblyInfo.cs b/Lib/Common.Split/NetFx/Properties/AssemblyInfo.cs index e26f7cd67..7b71e47e4 100644 --- a/Lib/Common.Split/NetFx/Properties/AssemblyInfo.cs +++ b/Lib/Common.Split/NetFx/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7.0")] -[assembly: AssemblyFileVersion("11.1.7.0")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0.0")] +[assembly: AssemblyFileVersion("11.2.0.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Lib/Common.Split/NetStandard/Microsoft.Azure.Storage.Common/Properties/AssemblyInfo.cs b/Lib/Common.Split/NetStandard/Microsoft.Azure.Storage.Common/Properties/AssemblyInfo.cs index c14206d78..815cd8c8f 100644 --- a/Lib/Common.Split/NetStandard/Microsoft.Azure.Storage.Common/Properties/AssemblyInfo.cs +++ b/Lib/Common.Split/NetStandard/Microsoft.Azure.Storage.Common/Properties/AssemblyInfo.cs @@ -34,9 +34,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7.0")] -[assembly: AssemblyFileVersion("11.1.7.0")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0.0")] +[assembly: AssemblyFileVersion("11.2.0.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Lib/Common.Split/NetStandard2/Properties/AssemblyInfo.cs b/Lib/Common.Split/NetStandard2/Properties/AssemblyInfo.cs index 690795a6e..649e8154c 100644 --- a/Lib/Common.Split/NetStandard2/Properties/AssemblyInfo.cs +++ b/Lib/Common.Split/NetStandard2/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7.0")] -[assembly: AssemblyFileVersion("11.1.7.0")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0.0")] +[assembly: AssemblyFileVersion("11.2.0.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN diff --git a/Lib/Common/Shared/Protocol/Constants.cs b/Lib/Common/Shared/Protocol/Constants.cs index 492761e53..e16c09203 100644 --- a/Lib/Common/Shared/Protocol/Constants.cs +++ b/Lib/Common/Shared/Protocol/Constants.cs @@ -1060,7 +1060,7 @@ static HeaderConstants() /// /// Specifies the value to use for UserAgent header. /// - public const string UserAgentProductVersion = "11.1.7"; + public const string UserAgentProductVersion = "11.2.0"; /// /// Master Microsoft Azure Storage header prefix. diff --git a/Lib/NetStandard2.Split/Blob/Properties/AssemblyInfo.cs b/Lib/NetStandard2.Split/Blob/Properties/AssemblyInfo.cs index 481602c64..0db02f39d 100644 --- a/Lib/NetStandard2.Split/Blob/Properties/AssemblyInfo.cs +++ b/Lib/NetStandard2.Split/Blob/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7.0")] -[assembly: AssemblyFileVersion("11.1.7.0")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0.0")] +[assembly: AssemblyFileVersion("11.2.0.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Lib/NetStandard2.Split/File/Properties/AssemblyInfo.cs b/Lib/NetStandard2.Split/File/Properties/AssemblyInfo.cs index 75a2dbbbb..4197954fa 100644 --- a/Lib/NetStandard2.Split/File/Properties/AssemblyInfo.cs +++ b/Lib/NetStandard2.Split/File/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7.0")] -[assembly: AssemblyFileVersion("11.1.7.0")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0.0")] +[assembly: AssemblyFileVersion("11.2.0.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo("Microsoft.Azure.Storage.Test, PublicKey=" + diff --git a/Lib/NetStandard2.Split/Queue/Properties/AssemblyInfo.cs b/Lib/NetStandard2.Split/Queue/Properties/AssemblyInfo.cs index 2b735c8e2..e296808e0 100644 --- a/Lib/NetStandard2.Split/Queue/Properties/AssemblyInfo.cs +++ b/Lib/NetStandard2.Split/Queue/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7.0")] -[assembly: AssemblyFileVersion("11.1.7.0")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0.0")] +[assembly: AssemblyFileVersion("11.2.0.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Lib/Netstandard.Split/Microsoft.Azure.Storage.Blob/Properties/AssemblyInfo.cs b/Lib/Netstandard.Split/Microsoft.Azure.Storage.Blob/Properties/AssemblyInfo.cs index 5af417f56..09de88b41 100644 --- a/Lib/Netstandard.Split/Microsoft.Azure.Storage.Blob/Properties/AssemblyInfo.cs +++ b/Lib/Netstandard.Split/Microsoft.Azure.Storage.Blob/Properties/AssemblyInfo.cs @@ -34,9 +34,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7")] -[assembly: AssemblyFileVersion("11.1.7")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0")] +[assembly: AssemblyFileVersion("11.2.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Lib/Netstandard.Split/Microsoft.Azure.Storage.File/Properties/AssemblyInfo.cs b/Lib/Netstandard.Split/Microsoft.Azure.Storage.File/Properties/AssemblyInfo.cs index 320c051a4..14af988c7 100644 --- a/Lib/Netstandard.Split/Microsoft.Azure.Storage.File/Properties/AssemblyInfo.cs +++ b/Lib/Netstandard.Split/Microsoft.Azure.Storage.File/Properties/AssemblyInfo.cs @@ -34,9 +34,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7")] -[assembly: AssemblyFileVersion("11.1.7")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0")] +[assembly: AssemblyFileVersion("11.2.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] [assembly: InternalsVisibleTo( "Microsoft.Azure.Storage.Test, PublicKey=" + diff --git a/Lib/Netstandard.Split/Microsoft.Azure.Storage.Queue/Properties/AssemblyInfo.cs b/Lib/Netstandard.Split/Microsoft.Azure.Storage.Queue/Properties/AssemblyInfo.cs index d78024abe..8833e3366 100644 --- a/Lib/Netstandard.Split/Microsoft.Azure.Storage.Queue/Properties/AssemblyInfo.cs +++ b/Lib/Netstandard.Split/Microsoft.Azure.Storage.Queue/Properties/AssemblyInfo.cs @@ -22,9 +22,9 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("9d154050-0b01-4f70-afa3-8e2176e9cd73")] -[assembly: AssemblyVersion("11.1.7")] -[assembly: AssemblyFileVersion("11.1.7")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0")] +[assembly: AssemblyFileVersion("11.2.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] [assembly: InternalsVisibleTo( "Microsoft.Azure.Storage.Test, PublicKey=" + diff --git a/Lib/WindowsDesktop.Split/Blob/Properties/AssemblyInfo.cs b/Lib/WindowsDesktop.Split/Blob/Properties/AssemblyInfo.cs index 9670d087a..8665406fb 100644 --- a/Lib/WindowsDesktop.Split/Blob/Properties/AssemblyInfo.cs +++ b/Lib/WindowsDesktop.Split/Blob/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7")] -[assembly: AssemblyFileVersion("11.1.7")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0")] +[assembly: AssemblyFileVersion("11.2.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Lib/WindowsDesktop.Split/File/Properties/AssemblyInfo.cs b/Lib/WindowsDesktop.Split/File/Properties/AssemblyInfo.cs index 6c7931b40..5a169d357 100644 --- a/Lib/WindowsDesktop.Split/File/Properties/AssemblyInfo.cs +++ b/Lib/WindowsDesktop.Split/File/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7")] -[assembly: AssemblyFileVersion("11.1.7")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0")] +[assembly: AssemblyFileVersion("11.2.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Lib/WindowsDesktop.Split/Queue/Properties/AssemblyInfo.cs b/Lib/WindowsDesktop.Split/Queue/Properties/AssemblyInfo.cs index 337dbc9de..c98e0dca0 100644 --- a/Lib/WindowsDesktop.Split/Queue/Properties/AssemblyInfo.cs +++ b/Lib/WindowsDesktop.Split/Queue/Properties/AssemblyInfo.cs @@ -35,9 +35,9 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("11.1.7")] -[assembly: AssemblyFileVersion("11.1.7")] -[assembly: AssemblyInformationalVersion("11.1.7.0")] +[assembly: AssemblyVersion("11.2.0")] +[assembly: AssemblyFileVersion("11.2.0")] +[assembly: AssemblyInformationalVersion("11.2.0.0")] #if SIGN [assembly: InternalsVisibleTo( diff --git a/Nuspecs/CreatePackages/CreatePackages.csproj b/Nuspecs/CreatePackages/CreatePackages.csproj index 231a3bb5f..258083d8e 100644 --- a/Nuspecs/CreatePackages/CreatePackages.csproj +++ b/Nuspecs/CreatePackages/CreatePackages.csproj @@ -1,7 +1,7 @@  - 11.1.7 + 11.2.0 origin/master v4.7.2 diff --git a/Queue/Changelog.txt b/Queue/Changelog.txt index 9de788b98..67ba9a4ad 100644 --- a/Queue/Changelog.txt +++ b/Queue/Changelog.txt @@ -1,3 +1,7 @@ +Changes in 11.2.0: + +- Updated REST version to 2019-07-07. + Changes in 11.1.7: - GitHub Issue #999 - NetworkTimeout not applied correctly in QueueRequestOptions. diff --git a/Queue/README.md b/Queue/README.md index a0652a2d4..0aef2ef69 100644 --- a/Queue/README.md +++ b/Queue/README.md @@ -1,4 +1,4 @@ -# Microsoft Azure Storage Queue SDK for .NET (11.1.7) +# Microsoft Azure Storage Queue SDK for .NET (11.2.0) The Microsoft Azure Storage Queue SDK for .NET allows you to build Azure applications that take advantage of scalable cloud computing resources. diff --git a/README.md b/README.md index cb1c0e5d5..a81f4ed75 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ We have engineered a highly performant and scalable SDK with our V12 releases. We encourage all our customers to give it a try. -# Microsoft Azure Storage SDK for .NET (11.1.7) +# Microsoft Azure Storage SDK for .NET (11.2.0) -> Server Version: 2019-02-02 +> Server Version: 2019-07-07 The Microsoft Azure Storage SDK for .NET allows you to build Azure applications that take advantage of scalable cloud computing resources. diff --git a/Test/ClassLibraryCommon/Blob/BlobCancellationUnitTests.cs b/Test/ClassLibraryCommon/Blob/BlobCancellationUnitTests.cs index b6725f94e..0a83ccce2 100644 --- a/Test/ClassLibraryCommon/Blob/BlobCancellationUnitTests.cs +++ b/Test/ClassLibraryCommon/Blob/BlobCancellationUnitTests.cs @@ -92,7 +92,7 @@ public void CloudBlockBlobDownloadToStreamAPMCancel() } catch (StorageException ex) { - Assert.AreEqual("The operation was canceled.", ex.Message); + Assert.AreEqual("A task was canceled.", ex.Message); Assert.AreEqual(ex.RequestInformation.HttpStatusCode, 306); Assert.AreEqual(ex.RequestInformation.HttpStatusMessage, null); } diff --git a/Test/ClassLibraryCommon/Blob/CloudAppendBlobTest.cs b/Test/ClassLibraryCommon/Blob/CloudAppendBlobTest.cs index 0126edae7..0e6283774 100644 --- a/Test/ClassLibraryCommon/Blob/CloudAppendBlobTest.cs +++ b/Test/ClassLibraryCommon/Blob/CloudAppendBlobTest.cs @@ -2208,10 +2208,10 @@ public void CloudAppendBlobSnapshot() List blobs = container.ListBlobs(null, true, BlobListingDetails.All, null, null).ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } finally { @@ -2301,10 +2301,11 @@ public void CloudAppendBlobSnapshotAPM() List blobs = container.ListBlobs(null, true, BlobListingDetails.All, null, null).ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } } finally @@ -2385,10 +2386,10 @@ public async Task CloudAppendBlobSnapshotTask() .Results .ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } finally { diff --git a/Test/ClassLibraryCommon/Blob/CloudBlobTest.cs b/Test/ClassLibraryCommon/Blob/CloudBlobTest.cs index 2ca759b63..c386aa511 100644 --- a/Test/ClassLibraryCommon/Blob/CloudBlobTest.cs +++ b/Test/ClassLibraryCommon/Blob/CloudBlobTest.cs @@ -129,10 +129,10 @@ public void CloudBlobSnapshot() List blobs = container.ListBlobs(null, true, BlobListingDetails.All, null, null).ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } finally { @@ -217,10 +217,10 @@ public void CloudBlobSnapshotAPM() List blobs = container.ListBlobs(null, true, BlobListingDetails.All, null, null).ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } } finally @@ -302,11 +302,10 @@ public async Task CloudBlobSnapshotTask() .Results .ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - Assert.IsTrue(((CloudBlob)blobs[2]).IsDeleted); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); AssertAreEqual(blob, (CloudBlob)blobs[3]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[4]); } finally { diff --git a/Test/ClassLibraryCommon/Blob/CloudBlockBlobTest.cs b/Test/ClassLibraryCommon/Blob/CloudBlockBlobTest.cs index ff5077d44..2cc4a03f3 100644 --- a/Test/ClassLibraryCommon/Blob/CloudBlockBlobTest.cs +++ b/Test/ClassLibraryCommon/Blob/CloudBlockBlobTest.cs @@ -3340,10 +3340,10 @@ public void CloudBlockBlobSnapshotAPM() List blobs = container.ListBlobs(null, true, BlobListingDetails.All, null, null).ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } } finally diff --git a/Test/ClassLibraryCommon/Blob/CloudPageBlobTest.cs b/Test/ClassLibraryCommon/Blob/CloudPageBlobTest.cs index 1a40e7f43..0639d743e 100644 --- a/Test/ClassLibraryCommon/Blob/CloudPageBlobTest.cs +++ b/Test/ClassLibraryCommon/Blob/CloudPageBlobTest.cs @@ -2579,11 +2579,11 @@ public void CloudPageBlobUploadFromStreamWithAccessCondition() blob.Create(1024); accessCondition = AccessCondition.GenerateIfNoneMatchCondition(blob.Properties.ETag); TestHelper.ExpectedException( - () => this.CloudPageBlobUploadFromStream(container, 6 * 512, null, accessCondition, 0, false, true), + () => this.CloudPageBlobUploadFromStream(container, 6 * 512, null, accessCondition, 0, false, true, blobName), "Uploading a blob on top of an existing blob should fail if the ETag matches", HttpStatusCode.PreconditionFailed); accessCondition = AccessCondition.GenerateIfMatchCondition(blob.Properties.ETag); - this.CloudPageBlobUploadFromStream(container, 6 * 512, null, accessCondition, 0, false, true); + this.CloudPageBlobUploadFromStream(container, 6 * 512, null, accessCondition, 0, false, true, blobName); blob = container.GetPageBlobReference("blob3"); blob.Create(1024); @@ -2664,10 +2664,10 @@ public async Task CloudPageBlobUploadFromStreamWithAccessConditionTask() await blob.CreateAsync(1024); accessCondition = AccessCondition.GenerateIfNoneMatchCondition(blob.Properties.ETag); await TestHelper.ExpectedExceptionAsync( - () => this.CloudPageBlobUploadFromStreamTask(container, 6 * 512, null, accessCondition, 0, true), + () => this.CloudPageBlobUploadFromStreamTask(container, 6 * 512, null, accessCondition, 0, true, blobName), "Uploading a blob on top of an existing blob should fail if the ETag matches"); accessCondition = AccessCondition.GenerateIfMatchCondition(blob.Properties.ETag); - await this.CloudPageBlobUploadFromStreamTask(container, 6 * 512, null, accessCondition, 0, true); + await this.CloudPageBlobUploadFromStreamTask(container, 6 * 512, null, accessCondition, 0, true, blobName); blob = container.GetPageBlobReference("blob3"); await blob.CreateAsync(1024); @@ -2923,7 +2923,7 @@ await TestHelper.ExpectedExceptionAsync( } #endif - private void CloudPageBlobUploadFromStream(CloudBlobContainer container, int size, long? copyLength, AccessCondition accessCondition, int startOffset, bool isAsync, bool testMd5) + private void CloudPageBlobUploadFromStream(CloudBlobContainer container, int size, long? copyLength, AccessCondition accessCondition, int startOffset, bool isAsync, bool testMd5, string blobName = null) { byte[] buffer = GetRandomBuffer(size); @@ -2934,7 +2934,11 @@ private void CloudPageBlobUploadFromStream(CloudBlobContainer container, int siz md5 = Convert.ToBase64String(hasher.ComputeHash(buffer, startOffset, copyLength.HasValue ? (int)copyLength : buffer.Length - startOffset)); } - var blobName = GetRandomBlobName(); + if (null == blobName) + { + blobName = GetRandomBlobName(); + } + CloudPageBlob blob = container.GetPageBlobReference(blobName); blob.StreamWriteSizeInBytes = 512; @@ -3017,7 +3021,7 @@ private void CloudPageBlobUploadFromStream(CloudBlobContainer container, int siz } #if TASK - private async Task CloudPageBlobUploadFromStreamTask(CloudBlobContainer container, int size, long? copyLength, AccessCondition accessCondition, int startOffset, bool testMd5) + private async Task CloudPageBlobUploadFromStreamTask(CloudBlobContainer container, int size, long? copyLength, AccessCondition accessCondition, int startOffset, bool testMd5, string blobName = null) { try { @@ -3031,7 +3035,11 @@ private async Task CloudPageBlobUploadFromStreamTask(CloudBlobContainer containe hasher.ComputeHash(buffer, startOffset, copyLength.HasValue ? (int)copyLength : buffer.Length - startOffset)); } - var blobName = GetRandomBlobName(); + if (null == blobName) + { + blobName = GetRandomBlobName(); + } + CloudPageBlob blob = container.GetPageBlobReference(blobName); blob.StreamWriteSizeInBytes = 512; @@ -3155,10 +3163,10 @@ public void CloudPageBlobSnapshot() List blobs = container.ListBlobs(null, true, BlobListingDetails.All, null, null).ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } finally { @@ -3250,10 +3258,10 @@ public void CloudPageBlobSnapshotAPM() List blobs = container.ListBlobs(null, true, BlobListingDetails.All, null, null).ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } } finally @@ -3338,10 +3346,10 @@ public async Task CloudPageBlobSnapshotTask() .Results .ToList(); Assert.AreEqual(4, blobs.Count); - AssertAreEqual(snapshot1, (CloudBlob)blobs[0]); - AssertAreEqual(snapshot2, (CloudBlob)blobs[1]); - AssertAreEqual(blob, (CloudBlob)blobs[2]); - AssertAreEqual(snapshotCopy, (CloudBlob)blobs[3]); + AssertAreEqual(snapshotCopy, (CloudBlob)blobs[0]); + AssertAreEqual(snapshot1, (CloudBlob)blobs[1]); + AssertAreEqual(snapshot2, (CloudBlob)blobs[2]); + AssertAreEqual(blob, (CloudBlob)blobs[3]); } finally { diff --git a/Test/WindowsRuntime/Blob/CloudPageBlobTest.cs b/Test/WindowsRuntime/Blob/CloudPageBlobTest.cs index 07ae8db0d..a2157fc75 100644 --- a/Test/WindowsRuntime/Blob/CloudPageBlobTest.cs +++ b/Test/WindowsRuntime/Blob/CloudPageBlobTest.cs @@ -1682,9 +1682,9 @@ await copy3.StartCopyAsync( TestHelper.Defiddler(source3), PremiumPageBlobTier.P6, null, null, null, null, CancellationToken.None); Assert.Fail("Expect failure when attempting to copy to too small of a disk"); } - catch (AggregateException e) + catch (StorageException e) { - Assert.AreEqual("Specified blob tier size limit cannot be less than content length.", e.InnerException.Message); + Assert.AreEqual("Specified blob tier size limit cannot be less than content length.", e.Message); Assert.IsFalse(copy3.Properties.BlobTierInferred.HasValue); } }