Files
Business-Management/tests/ai-service_tests.md
T
curo1305 50d2348b36 refactor: rename MERGE_CHECKLIST to ALL_TESTS + add per-service test files
- tests/MERGE_CHECKLIST.md → tests/ALL_TESTS.md (git rename, updated header + index of sub-files)
- tests/backend_tests.md — §1–9, §18 (auth, users, admin, groups, appearance, service health, plugins, AI/doc settings, infra/security)
- tests/frontend_tests.md — §19 (UI & routing)
- tests/doc-service_tests.md — §10–16 (upload/processing, list/filtering, slide-over, sharing, categories, bulk actions, watch directory)
- tests/ai-service_tests.md — §17 (AI queue & providers)
- CLAUDE.md: updated merge checklist section, file tree, and self-update checkpoint with mandatory test-file update rule
- settings.local.json: added docker inspect/ps, curl, lsof, git merge/branch/log/diff/status/config/mv permissions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 02:19:51 +02:00

1.8 KiB

AI-Service Tests

Tests covering the AI provider intermediary (ai-service:8010): health, provider configuration, synchronous chat, the priority queue (enqueue/poll/cancel/pause/resume), and provider timeout.

Full combined suite: tests/ALL_TESTS.md

Test environment: Feature stack at http://localhost:$PORT (see CLAUDE.md §Feature branch workflow). Admin credentials: any superuser account created during stack setup.


Legend

Symbol Meaning
Pass
Fail
N/A for this change

17. AI Service — Queue & Providers

# Test Steps Expected
17.1 Health check GET /health on ai-service (via backend services endpoint) {"status": "ok"}
17.2 Provider health GET /health/provider Active provider name, model, configured=true
17.3 Unconfigured provider Set provider to "anthropic" with empty API key → test connection 503 or 502 with clear error
17.4 Sync chat POST /chat with valid messages array Response returned synchronously
17.5 Queue — async job POST /queue/jobs job_id returned immediately
17.6 Queue — poll job GET /queue/jobs/{id} after enqueue Returns status (pendingdone) and result
17.7 Queue — cancel job DELETE /queue/jobs/{id} before processing Job removed; status = cancelled
17.8 Queue pause POST /queue/pause 204; current job finishes; no new jobs picked up
17.9 Queue resume POST /queue/resume after pause 204; worker resumes; pending jobs process
17.10 Priority ordering Enqueue LOW then HIGH job HIGH job processed first
17.11 Provider timeout POST /chat when provider is unreachable 504 returned after timeout