Files
rag-technical-docs-assistant/tests
amirhosein mazaheri b036912293 feat(ingestion): implement Phase 2 multi-format intake and raw storage
- Add format validation and inspection for PDF, DOCX, Markdown, Text, HTML, and images
- Implement secure decompression defenses (zip bombs, ratio checks) and image dimension limits
- Implement FileStore with content-addressable storage and intake repositories
- Add unit and integration tests for document intake, format sniffing, and storage roots
- Include sample acceptance document fixtures in data/documents/
2026-10-07 16:20:41 +03:30
..

Test layout

  • unit/: provider-free configuration, URL security, imports and test-environment regressions.
  • integration/: PostgreSQL constraints, migration/profile lifecycle, concurrency, native vectors and schema isolation.
  • support/: reusable PostgreSQL lifecycle and row helpers; helpers do not live in test modules.
  • conftest.py: shared settings, isolated environment and acceptance option.
  • integration/conftest.py: database fixtures and postgres marker for all integration cases.
  • postgres_prerequisites.py: unchanged prerequisite command entry point.

Run ordinary tests:

.venv/Scripts/python -m pytest -m "not postgres"

For database tests, configure an isolated TEST_DATABASE_URL as described in foundation setup, then run:

.venv/Scripts/python -m tests.postgres_prerequisites
.venv/Scripts/python -m pytest -m postgres --require-postgres

Use .venv/minimum/Scripts/python for the minimum pgvector dependency environment. The same commands and assertions apply. Missing database configuration fails explicit acceptance; skipped database cases are not passing evidence.

Organization validation: installed environment full suite 163 passed; minimum pgvector 0.3.6 PostgreSQL suite 48 passed. Both prerequisite checks passed. Production code and migration history were unchanged.