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

test: improve CORS wildcard handling and testing #144

Merged
merged 1 commit into from Mar 6, 2024
Merged

Conversation

appleboy
Copy link
Member

@appleboy appleboy commented Mar 6, 2024

  • Add two new test functions in cors_test.go for parsing wildcard rules: one without wildcards and one with invalid wildcards
  • Ensure no wildcard rules are returned when AllowWildcard is set to false
  • Verify that parsing invalid wildcard rules triggers a panic

- Add two new test functions in `cors_test.go` for parsing wildcard rules: one without wildcards and one with invalid wildcards
- Ensure no wildcard rules are returned when `AllowWildcard` is set to false
- Verify that parsing invalid wildcard rules triggers a panic

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.11%. Comparing base (fcbd06f) to head (37af0f5).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   94.22%   95.11%   +0.88%     
==========================================
  Files           3        3              
  Lines         225      225              
==========================================
+ Hits          212      214       +2     
+ Misses         12       11       -1     
+ Partials        1        0       -1     
Flag Coverage Δ
go- 95.11% <ø> (+0.88%) ⬆️
go-1.18 95.11% <ø> (+0.88%) ⬆️
go-1.19 95.11% <ø> (+0.88%) ⬆️
go-1.20 95.11% <ø> (+0.88%) ⬆️
go-1.21 95.11% <ø> (+0.88%) ⬆️
go-1.22 95.11% <ø> (+0.88%) ⬆️
macos-latest 95.11% <ø> (+0.88%) ⬆️
ubuntu-latest 95.11% <ø> (+0.88%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@appleboy appleboy merged commit 85bf9fb into master Mar 6, 2024
9 checks passed
@appleboy appleboy deleted the testing branch March 6, 2024 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants