Skip to content

chore: add faking 429 responses from fake idp #12365

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

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Feb 29, 2024

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

Required to trigger error condition in fe
Comment on lines +247 to +255
type With429Arguments struct {
AllPaths bool
TokenPath bool
AuthorizePath bool
KeysPath bool
UserInfoPath bool
DeviceAuth bool
DeviceVerify bool
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

🤷

@Emyrk Emyrk merged commit cbcf4ef into main Feb 29, 2024
@Emyrk Emyrk deleted the stevenmasley/test-idp-429 branch February 29, 2024 15:45
@github-actions github-actions bot locked and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants