-
Notifications
You must be signed in to change notification settings - Fork 394
Validate proposed Blob and Container lease IDs #2812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
8
commits into
main
Choose a base branch
from
copilot/fix-azure-azurite-issue-2367
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1cf4641
Initial plan
Copilot d90c6cf
Validate proposed lease IDs
Copilot bba980e
Add lease ID validation tests
Copilot a38b8a5
Address lease validation review feedback
Copilot 97bce40
Share lease validation test helpers
Copilot 2b13d09
Address lease validation review feedback
Copilot 785fc8e
Clean up lease format tests
Copilot 984ef13
Merge branch 'main' into copilot/fix-azure-azurite-issue-2367
jainakanksha-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import * as assert from "assert"; | ||
|
|
||
| export const bracedGuid = "{ca761232-ed42-11ce-bacd-00aa0057b223}"; | ||
| export const parenthesizedGuid = "(ca761232-ed42-11ce-bacd-00aa0057b223)"; | ||
| export const xFormatGuid = | ||
| "{0xca761232,0xed42,0x11ce,{0xba,0xcd,0x00,0xaa,0x00,0x57,0xb2,0x23}}"; | ||
| export const xFormatGuidUppercasePrefix = | ||
| "{0Xca761232,0Xed42,0X11ce,{0Xba,0Xcd,0X00,0Xaa,0X00,0X57,0Xb2,0X23}}"; | ||
| export const xFormatGuidExtraClosingBrace = `${xFormatGuid}}`; | ||
|
|
||
| export function assertInvalidProposedLeaseId( | ||
| error: any, | ||
| headerValue: string | ||
| ): void { | ||
| assert.deepStrictEqual(error.statusCode, 400); | ||
| assert.deepStrictEqual(error.code, "InvalidHeaderValue"); | ||
| assert.deepStrictEqual(error.details.errorCode, "InvalidHeaderValue"); | ||
| assert.deepStrictEqual( | ||
| /<HeaderName>([^<]*)</.exec(error.response?.bodyAsText ?? "")?.[1], | ||
| "x-ms-proposed-lease-id" | ||
| ); | ||
| assert.deepStrictEqual( | ||
| /<HeaderValue>([^<]*)</.exec(error.response?.bodyAsText ?? "")?.[1], | ||
| headerValue | ||
| ); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.