-
Notifications
You must be signed in to change notification settings - Fork 269
Breaking context change #88
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
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 pretty solid. Just one suggestion regarding tests.
|
||
func TestNonExisting(t *testing.T) { | ||
err := client.DeleteInstanceID(context.Background(), "dnon-existY") | ||
// legal instance IDs are /[cdef][A-Za-z0-9_-]{9}[AEIMQUYcgkosw048]/ |
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 doesn't look like it belong here. May be it will go away when merged with the latest dev?
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 explains fictive-ID0 , i'll change the comment
auth/auth_test.go
Outdated
) | ||
|
||
var client *Client | ||
var ctx context.Context |
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 ever assigned to? Personally, I think we are better off calling context.Background()
everywhere this is needed. Otherwise it is somewhat confusing since this is referenced from multiple test files.
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 gets set in test main for the app engine in line 60, else 68.
are we dropping the AE support?
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.
Ah I see. Then lets leave it as is for now. Going forward though I think we should remove the dev app server test mode. It's complicating the code here.
* Cleaning up the auth package * Variable grouping * Removing some punctuation; Changed id to ID in error messages
* Cleaning up the auth (user management) code * Added a few more tests * Removed the fields inner type from UserToCreate and UserToUpdate * Renamed _req variables; More consistent error messages
* Breaking context change (#88) * context signatures * VerifyIDToken context * custom token context * fix context arguments * custom token with claims context * remove TODO * integration_iid_name * propagate ctx * propagate to private functions * snippets and tests ctx * integration test user2 fix * error message * Revert "integration test user2 fix" This reverts commit 57148ce. * add context to AE, fix integration test after merge. * Revert "error message" This reverts commit db7c34a. * Merged with latest dev * Using the 1.6 import for context * Dropping call to WithContext * Cleaning up the auth package (#134) * Cleaning up the auth package * Variable grouping * Removing some punctuation; Changed id to ID in error messages * Adding a minor comment * Cleaning up the auth (user management) code (#136) * Cleaning up the auth (user management) code * Added a few more tests * Removed the fields inner type from UserToCreate and UserToUpdate * Renamed _req variables; More consistent error messages * Removing golint checks from 1.6.x build (#141) * Removing golint checks from 1.6.x build * Minor reformat * Bumped version to 3.0.0 (#142) * Bumped version to 3.0.0 * Updated changelog
* context signatures * VerifyIDToken context * custom token context * fix context arguments * custom token with claims context * remove TODO * integration_iid_name * propagate ctx * propagate to private functions * snippets and tests ctx * integration test user2 fix * error message * Revert "integration test user2 fix" This reverts commit 57148ce. * add context to AE, fix integration test after merge. * Revert "error message" This reverts commit db7c34a. * Merged with latest dev * Using the 1.6 import for context * Dropping call to WithContext * Cleaning up the auth package (#134) * Cleaning up the auth package * Variable grouping * Removing some punctuation; Changed id to ID in error messages * Adding a minor comment * Cleaning up the auth (user management) code (#136) * Cleaning up the auth (user management) code * Added a few more tests * Removed the fields inner type from UserToCreate and UserToUpdate * Renamed _req variables; More consistent error messages
do not merge, this is a breaking change.
adding context to network calls.