-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
63 lines (59 loc) · 1.6 KB
/
docker-compose.test.yml
File metadata and controls
63 lines (59 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Full integration test suite with all external dependencies
#
# Usage:
# docker compose -f docker-compose.test.yml up --build --abort-on-container-exit
#
# Services:
# postgres: PostgreSQL 16 + pgvector + pg_trgm
# vault-test: Python test runner with ALL extras + liboqs
services:
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: test_vault
POSTGRES_USER: vault
POSTGRES_PASSWORD: vault_test
healthcheck:
test: ["CMD-SHELL", "pg_isready -U vault -d test_vault"]
interval: 2s
timeout: 5s
retries: 10
tmpfs:
- /var/lib/postgresql/data # RAM-backed for speed
ollama:
image: ollama/ollama:latest
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 5s
timeout: 10s
retries: 30
start_period: 30s
ollama-pull:
image: ollama/ollama:latest
depends_on:
ollama:
condition: service_healthy
entrypoint: ["ollama", "pull", "llama3.2"]
environment:
OLLAMA_HOST: "http://ollama:11434"
vault-test:
build:
context: .
dockerfile: Dockerfile.test
depends_on:
postgres:
condition: service_healthy
ollama-pull:
condition: service_completed_successfully
environment:
VAULT_TEST_POSTGRES_DSN: "postgresql://vault:vault_test@postgres:5432/test_vault"
VAULT_TEST_OLLAMA: "1"
OLLAMA_HOST: "http://ollama:11434"
VAULT_TEST_ALL_EXTRAS: "1"
volumes:
- ./tests:/app/tests:ro
- ./src:/app/src:ro
command: >
pytest tests/ -v --tb=short
--cov=qp_vault --cov-report=term-missing
-x