Skip to content

Commit

Permalink
azure storage support overwrite blob resource (Azure#13859)
Browse files Browse the repository at this point in the history
Co-authored-by: unknown <fenzho@FZHOU.fareast.corp.microsoft.com>
  • Loading branch information
zhoufenqin and unknown authored Aug 7, 2020
1 parent 8b28942 commit a165390
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public OutputStream getOutputStream() throws IOException {
throw new FileNotFoundException("The blob was not found: " + this.location);
}
}
return this.blockBlobClient.getBlobOutputStream();
return this.blockBlobClient.getBlobOutputStream(true);
} catch (BlobStorageException e) {
LOG.error(MSG_FAIL_OPEN_OUTPUT, e);
throw new IOException(MSG_FAIL_OPEN_OUTPUT, e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static BlobServiceClientBuilder mockBlobServiceClientBuilder() {
when(nonExistingBlockBlob.getBlobName()).thenReturn(NON_EXISTING);

when(blockBlob.openInputStream()).thenReturn(mock(BlobInputStream.class));
when(blockBlob.getBlobOutputStream()).thenReturn(mock(BlobOutputStream.class));
when(blockBlob.getBlobOutputStream(true)).thenReturn(mock(BlobOutputStream.class));

when(blockBlob.getProperties()).thenReturn(blobProperties);
when(blobProperties.getBlobSize()).thenReturn(CONTENT_LENGTH);
Expand Down

0 comments on commit a165390

Please sign in to comment.