Repository navigation
add features #37
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
add features #37
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
ef3c5ab
add features
CSCITech 0644df2
add features
CSCITech 6f1d4a5
add features
CSCITech c01c5ef
add features
CSCITech 1a89b81
add features
CSCITech 1e9c191
add features
CSCITech 4877d63
fix: close latest PR 37 review findings
CSCITech a060869
add features
CSCITech 392608b
add features
CSCITech 68dd708
add features
CSCITech 2fae89a
add features
CSCITech 0217b7b
add features
CSCITech d80303b
add features
CSCITech 3f715f3
add features
CSCITech b23108b
add features
CSCITech 379a0ab
add features
CSCITech eb028f9
add features
CSCITech 1e04d51
add features
CSCITech 85391a0
add features
CSCITech f334446
add features
CSCITech 309e52b
add features
CSCITech b90609c
fix: correct tiered pricing editor behavior
CSCITech 00dea30
test: harden tiered pricing editor regressions
CSCITech ff16915
add features
CSCITech bfba455
add features
CSCITech 1fe224a
add features
CSCITech b42ddbc
add features
CSCITech 7adaa40
add features
CSCITech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| package common | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestRateLimitEnvironmentDefaults(t *testing.T) { | ||
| envKeys := []string{ | ||
| "GLOBAL_API_RATE_LIMIT_ENABLE", | ||
| "GLOBAL_API_RATE_LIMIT", | ||
| "GLOBAL_API_RATE_LIMIT_DURATION", | ||
| "GLOBAL_WEB_RATE_LIMIT_ENABLE", | ||
| "GLOBAL_WEB_RATE_LIMIT", | ||
| "GLOBAL_WEB_RATE_LIMIT_DURATION", | ||
| "CRITICAL_RATE_LIMIT_ENABLE", | ||
| "CRITICAL_RATE_LIMIT", | ||
| "CRITICAL_RATE_LIMIT_DURATION", | ||
| "CRITICAL_ROUTE_RATE_LIMIT", | ||
| "CRITICAL_ROUTE_RATE_LIMIT_DURATION", | ||
| "LOGIN_RATE_LIMIT_ENABLE", | ||
| "LOGIN_RATE_LIMIT", | ||
| "LOGIN_RATE_LIMIT_DURATION", | ||
| "SEARCH_RATE_LIMIT_ENABLE", | ||
| "SEARCH_RATE_LIMIT", | ||
| "SEARCH_RATE_LIMIT_DURATION", | ||
| } | ||
| for _, key := range envKeys { | ||
| t.Setenv(key, "") | ||
| } | ||
|
|
||
| initRateLimitEnv() | ||
|
|
||
| require.True(t, GlobalApiRateLimitEnable) | ||
| require.Equal(t, 720, GlobalApiRateLimitNum) | ||
| require.EqualValues(t, 180, GlobalApiRateLimitDuration) | ||
| require.True(t, GlobalWebRateLimitEnable) | ||
| require.Equal(t, 600, GlobalWebRateLimitNum) | ||
| require.EqualValues(t, 180, GlobalWebRateLimitDuration) | ||
| require.True(t, CriticalRateLimitEnable) | ||
| require.Equal(t, 200, CriticalRateLimitNum) | ||
| require.EqualValues(t, 20*60, CriticalRateLimitDuration) | ||
| require.Equal(t, 200, CriticalRouteRateLimitNum) | ||
| require.EqualValues(t, 20*60, CriticalRouteRateLimitDuration) | ||
| require.True(t, LoginRateLimitEnable) | ||
| require.Equal(t, 100, LoginRateLimitNum) | ||
| require.EqualValues(t, 15*60, LoginRateLimitDuration) | ||
| require.True(t, SearchRateLimitEnable) | ||
| require.Equal(t, 100, SearchRateLimitNum) | ||
| require.EqualValues(t, 60, SearchRateLimitDuration) | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Run lint and formatting checks in frontend CI.
Frontend CI still does not run
bun run lintorbun run format:check. A pull request can pass CI with lint or formatting violations. Add both checks before the build.🤖 Prompt for AI Agents
Source: Coding guidelines