Skip to content

Commit

Permalink
[Storage](Blob) Skip one batch test case and protect it from failure …
Browse files Browse the repository at this point in the history
…when token credential is not set.
  • Loading branch information
jiacfan authored and vinjiang committed Sep 9, 2019
1 parent 379f6de commit 69eb46f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sdk/storage/storage-blob/test/blobbatch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,19 @@ describe("BlobBatch", () => {
});

it("submitBatch should work with multiple types of credentials for subrequests", async () => {
// Try to get serviceURL object with TokenCredential
// when ACCOUNT_TOKEN environment variable is set
let tokenCredential;
try {
tokenCredential = getTokenCredential();
} catch {}

// Requires bearer token for this case which cannot be generated in the runtime
// Make sure this case passed in sanity test
if (tokenCredential === undefined) {
return;
}

// Upload blobs.
await blockBlobURLs[0].upload(Aborter.none, content, content.length);
await blockBlobURLs[1].upload(Aborter.none, content, content.length);
Expand Down

0 comments on commit 69eb46f

Please sign in to comment.