chore: add faking 429 responses from fake idp#12365
Merged
Merged
Conversation
Required to trigger error condition in fe
johnstcn
approved these changes
Feb 29, 2024
Comment on lines
+247
to
+255
| type With429Arguments struct { | ||
| AllPaths bool | ||
| TokenPath bool | ||
| AuthorizePath bool | ||
| KeysPath bool | ||
| UserInfoPath bool | ||
| DeviceAuth bool | ||
| DeviceVerify bool | ||
| } |
Member
There was a problem hiding this comment.
idea: just supply a number of RegExes to match the given paths? That way you can reuse it however you like. But this is probably fine though.
Member
Author
There was a problem hiding this comment.
Yea, that would work too. I think this is fine though. It's so niche. I just made it to reproduce this: #12367
Felt like I should just throw it in a PR. If someone wants to improve this later, they can. We could also replace the bool with a number and return 500s etc.
🤷
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Created this so I can reproduce a 429 issue in the FE: #11570 (comment)
Example run:
go run ./scripts/testidp/main.go --device-flow --429=device