-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Tables] Fix setting access policy and add test #15633
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
Conversation
|
||
import "./env"; | ||
|
||
const mockAccountName = "fakestorageaccount"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
signature auth methods are sensitive to changes in the account name. So I decided to bring back the account name to allow us to test with playback using AzureNamedKeyCredential
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this going to make it harder for someone who isn't you to update the tests? Or would they just need to change the name to the account they recorded with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I found a way to keep it replaced so that this doesn't become a problem. Waiting for CI to confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a few little remarks
|
||
import "./env"; | ||
|
||
const mockAccountName = "fakestorageaccount"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this going to make it harder for someone who isn't you to update the tests? Or would they just need to change the name to the account they recorded with?
/azp run js - data-tables - test |
No pipelines are associated with this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could very likely be a case of "Matt doesn't grok promises again today" but I made a note about us maybe wanting to await
something we weren't previously. Not sure if this is indicative of a larger issue.
Also, I made one small note on the generated code before I realized I was reviewing generated code, but maybe it's worthwhile feedback.
throw new Error("'url' cannot be null or empty"); | ||
constructor(url: string, options?: GeneratedClientOptionalParams) { | ||
if (url === undefined) { | ||
throw new Error("'url' cannot be null"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message says url
can not be null
but the check just ensures it is not undefined
.
I guess this is all generated code anyway and we wouldn't call it with null but it feels a little weird that the generate code comment is misleading?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is great feedback, thanks!
fyi: @sarangan12
override-client-name: GeneratedClient | ||
use-extension: | ||
"@autorest/typescript": "https://aka.ms/autorest/typescript/corev2" | ||
"@autorest/typescript": "latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azp run js - data-tables - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Hello @joheredi! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Tables service take dates for access policy on an ISO8061 format without decimals on the seconds. However, when Javascript serializes a Date object the ISO representation contains decimals which cause the service to reject the request.
This PR includes: