Skip to content

chore: add faking 429 responses from fake idp#12365

Merged
Emyrk merged 1 commit into
mainfrom
stevenmasley/test-idp-429
Feb 29, 2024
Merged

chore: add faking 429 responses from fake idp#12365
Emyrk merged 1 commit into
mainfrom
stevenmasley/test-idp-429

Conversation

@Emyrk
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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