Skip to content

test: add tests for rate_limiter.check_scan_rate_limit (closes #2446) - #2451

Merged
utksh1 merged 2 commits into
utksh1:mainfrom
tmdeveloper007:#2446
Aug 6, 2026
Merged

test: add tests for rate_limiter.check_scan_rate_limit (closes #2446)#2451
utksh1 merged 2 commits into
utksh1:mainfrom
tmdeveloper007:#2446

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary

Adds unit tests for backend.secuscan.rate_limiter.check_scan_rate_limit,a FastAPI dependency that enforces per-tenant scan-rate limits.

Changes

  • New test file: testing/backend/unit/test_rate_limiter_check_scan_rate_limit.py
  • 4 async tests covering: call through when limiter is set,
    HTTPException propagation, no-op when limiter is None,
    no-op when app.state is absent

Testing

  • All 4 tests pass with python -m pytest testing/backend/unit/test_rate_limiter_check_scan_rate_limit.py --noconftest -v

@utksh1 utksh1 added area:backend Backend API, database, or service work level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label labels Aug 4, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The code change is reviewed and the backend/lint checks are green. Merge remains blocked by the required frontend audit, which reports the pre-existing high-severity undici vulnerability; I am not bypassing that security gate.

@utksh1
utksh1 merged commit 2f82738 into utksh1:main Aug 6, 2026
24 checks passed
@utksh1 utksh1 added the gssoc:approved Admin validation: approved for GSSoC scoring label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work gssoc:approved Admin validation: approved for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants