1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-30 02:29:39 +02:00
Maybe/test/controllers/api
Zach Gollwitzer 018310d4d1 Fix rate limiting errors in API transaction controller tests
When tests run in parallel, they were sharing the same API key fixtures
which caused Redis rate limit counters to accumulate across test workers,
leading to unexpected rate limit errors.

Changes:
- Create fresh API keys in setup instead of using fixtures
- Each API key gets a unique auto-generated ID
- Clear existing active keys to avoid validation conflicts
- Use different sources (web/mobile) for multiple test keys
- Clear Redis rate limit data in setup to ensure clean state
- Update api_headers helper to use display_key instead of plain_key

This follows the existing pattern used in UsageControllerTest for
handling API keys that interact with Redis state.
2025-07-08 11:46:33 -04:00
..
v1 Fix rate limiting errors in API transaction controller tests 2025-07-08 11:46:33 -04:00