Skip to content
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

Auth and multi-extension integration tests #99

Merged
merged 7 commits into from
Oct 8, 2024
Merged

Conversation

adam-cattermole
Copy link
Member

@adam-cattermole adam-cattermole commented Oct 4, 2024

Fixed a couple minor points in the configuration (defaults + dead_code) as well as updating existing tests for the new fields.

Added two new files to perform some of the integration tests for auth as well as multi-extension operation (authenticated rate limiting).

Multi-extension tests currently don't pass as there's a bug fix in #98 where the headers were being retrieved for every extension.

@adam-cattermole adam-cattermole force-pushed the auth-tests branch 4 times, most recently from ea50d39 to 0acd3e0 Compare October 7, 2024 13:46
Signed-off-by: Adam Cattermole <[email protected]>
Signed-off-by: Adam Cattermole <[email protected]>
Signed-off-by: Adam Cattermole <[email protected]>
Signed-off-by: Adam Cattermole <[email protected]>
Signed-off-by: Adam Cattermole <[email protected]>
Signed-off-by: Adam Cattermole <[email protected]>
Signed-off-by: Adam Cattermole <[email protected]>
4, 72, 84, 84, 80, 82, 20, 10, 4, 104, 111, 115, 116, 18, 12, 97, 117, 116, 104,
99, 111, 110, 102, 105, 103, 45, 65, 90, 0,
]),
Some(5000),
Copy link
Member

Choose a reason for hiding this comment

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

We'll need to set the timeout config when #101 is merged


#[test]
#[serial]
fn it_performs_authenticated_rate_limiting() {
Copy link
Member

Choose a reason for hiding this comment

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

💛


#[test]
#[serial]
fn unauthenticated_does_not_ratelimit() {
Copy link
Member

Choose a reason for hiding this comment

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

👍🏼

Copy link
Member

@didierofrivia didierofrivia left a comment

Choose a reason for hiding this comment

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

These new tests cover some of the user guides we provide in our docs, so this is perfect. Also, great bonus cleaning the code 🥇

@adam-cattermole adam-cattermole merged commit fd09258 into main Oct 8, 2024
8 checks passed
@adam-cattermole adam-cattermole deleted the auth-tests branch October 8, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants