Skip to content

Commit

Permalink
[Storage] OpenRead/Write test recordings are back. (#14963)
Browse files Browse the repository at this point in the history
* Prepare Storage for release

* pr feedback.

* PR feedback.

* pr feedback.

* make open write work with using.

* move recordings to right place

* pr feedback.

* record open write tests.
  • Loading branch information
kasobol-msft authored Sep 8, 2020
1 parent 6ee76ca commit d1ed549
Show file tree
Hide file tree
Showing 44 changed files with 4,519 additions and 8,334 deletions.
7 changes: 0 additions & 7 deletions sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@ public async Task DownloadEmptyBlobTest()
}

[Test]
[LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/13510
public async Task OpenReadAsync()
{
int size = Constants.KB;
Expand All @@ -947,7 +946,6 @@ public async Task OpenReadAsync()
}

[Test]
[LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/13510
public async Task OpenReadAsync_BufferSize()
{
int size = Constants.KB;
Expand Down Expand Up @@ -1030,7 +1028,6 @@ await TestHelper.AssertExpectedExceptionAsync<RequestFailedException>(
}

[Test]
[LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/13510
public async Task OpenReadAsync_AccessConditions()
{
// Arrange
Expand Down Expand Up @@ -1107,7 +1104,6 @@ await TestHelper.CatchAsync<Exception>(
}

[Test]
[LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/13510
public async Task OpenReadAsync_StrangeOffsetsTest()
{
// Arrange
Expand Down Expand Up @@ -1150,7 +1146,6 @@ public async Task OpenReadAsync_StrangeOffsetsTest()
}

[Test]
[LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/13510
public async Task OpenReadAsync_Modified()
{
int size = Constants.KB;
Expand Down Expand Up @@ -1191,7 +1186,6 @@ await TestHelper.AssertExpectedExceptionAsync<RequestFailedException>(
}

[Test]
[LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/13510
public async Task OpenReadAsync_ModifiedAllowBlobModifications()
{
int size = Constants.KB;
Expand Down Expand Up @@ -1275,7 +1269,6 @@ await blobClient.UploadAsync(stream,
}

[Test]
[LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/13510
public async Task OpenReadAsync_CopyReadStreamToAnotherStream()
{
// Arrange
Expand Down
10 changes: 1 addition & 9 deletions sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2425,7 +2425,6 @@ await TestHelper.AssertExpectedExceptionAsync<ArgumentException>(
}

[Test]
[Ignore("https://github.com/Azure/azure-sdk-for-net/issues/13510")]
public async Task OpenWriteAsync_ModifiedDuringWrite()
{
// Arrange
Expand All @@ -2438,7 +2437,7 @@ public async Task OpenWriteAsync_ModifiedDuringWrite()
// Act
Stream openWriteStream = await blob.OpenWriteAsync(overwrite: true);

string blockId = GenerateBlockId();
string blockId = ToBase64(GetNewBlockName());
await blob.StageBlockAsync(blockId, stream);
stream.Position = 0;
await blob.CommitBlockListAsync(new List<string> { blockId });
Expand Down Expand Up @@ -2545,13 +2544,6 @@ await TestHelper.AssertExpectedExceptionAsync<RequestFailedException>(
}
}

private static string GenerateBlockId()
{
Guid guid = Guid.NewGuid();
byte[] bytes = Encoding.UTF8.GetBytes(guid.ToString());
return Convert.ToBase64String(bytes);
}

private RequestConditions BuildRequestConditions(AccessConditionParameters parameters)
=> new RequestConditions
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d1ed549

Please sign in to comment.