Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: remove slow static file test from rate limiting test

LearningCircuitc74f87bcb322
diff --git a/tests/ui_tests/test_rate_limiting_settings.js b/tests/ui_tests/test_rate_limiting_settings.js
index 545f9d2318..b108efddae 100644
--- a/tests/ui_tests/test_rate_limiting_settings.js
+++ b/tests/ui_tests/test_rate_limiting_settings.js
@@ -21,25 +21,8 @@ async function testRateLimiting() {
try {
console.log('🚀 Starting rate limiting functionality test...');
- // Test 1: Verify static files are exempt from rate limiting
- console.log('\n🔍 Test 1: Static files should be exempt from rate limiting');
-
- // Make many requests to static files - should not trigger rate limit
- for (let i = 0; i < 60; i++) {
- const response = await page.goto(`${baseUrl}/static/favicon.ico`, {
- waitUntil: 'networkidle0',
- timeout: 5000
- });
-
- if (response.status() === 429) {
- console.log(`❌ Static file was rate limited on request ${i + 1}`);
- throw new Error('Static files should be exempt from rate limiting');
- }
- }
- console.log('✅ Static files are exempt from rate limiting (made 60 requests successfully)');
-
- // Test 2: Test login rate limiting (5 per 15 minutes)
- console.log('\n🔍 Test 2: Login endpoint should be rate limited (5 attempts per 15 min)');
+ // Test 1: Test login rate limiting (5 per 15 minutes)
+ console.log('\n🔍 Test 1: Login endpoint should be rate limited (5 attempts per 15 min)');
await page.goto(`${baseUrl}/auth/login`, { waitUntil: 'networkidle0' });
@@ -94,8 +77,8 @@ async function testRateLimiting() {
console.log(`⚠️ Rate limit triggered later than expected (after ${loginAttempts} attempts, expected ~5)`);
}
- // Test 3: Test registration rate limiting (3 per hour)
- console.log('\n🔍 Test 3: Registration endpoint should be rate limited (3 attempts per hour)');
+ // Test 2: Test registration rate limiting (3 per hour)
+ console.log('\n🔍 Test 2: Registration endpoint should be rate limited (3 attempts per hour)');
// Use a different page context to reset cookies/session
const page2 = await browser.newPage();
@@ -154,8 +137,8 @@ async function testRateLimiting() {
await page2.close();
- // Test 4: Verify 429 error response format
- console.log('\n🔍 Test 4: Verify 429 error response format');
+ // Test 3: Verify 429 error response format
+ console.log('\n🔍 Test 3: Verify 429 error response format');
const errorResponse = await page.evaluate(async (baseUrl) => {
const res = await fetch(`${baseUrl}/api/v1/auth/login`, {
@@ -191,7 +174,6 @@ async function testRateLimiting() {
// Summary
console.log('\n📊 Test Summary:');
- console.log(`✅ Static files exempt from rate limiting: PASS`);
console.log(`✅ Login rate limiting (5 per 15 min): PASS (triggered after ${loginAttempts} attempts)`);
console.log(`✅ Registration rate limiting (3 per hour): PASS (triggered after ${registrationAttempts} attempts)`);
console.log(`✅ Error response format: PASS`);