359f945170
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
- Python: fix wire protocol test method names (bool_val -> bool, etc.) - Python: make integration tests and example fully async with pytest-asyncio - Rust: add tokio dev-dependency and convert integration tests to async/await - Rust: update ping_test example to async - Nim: remove committed ELF build artifact - Docker: add BARADB_HOST/BARADB_PORT env vars to test containers - Docker: fix docker-compose.test.yml usage (remove --abort-on-container-exit) - Add scripts/test-clients.sh for sequential client test runs - Remove docker-compose.test.yml from .gitignore so it is tracked - Fix repository URLs in Python and Rust READMEs
102 lines
2.6 KiB
YAML
102 lines
2.6 KiB
YAML
# BaraDB — Client Integration Test Stack
|
|
#
|
|
# This compose file starts BaraDB server and runs all client test suites.
|
|
# Because test containers run in parallel, do NOT use --abort-on-container-exit
|
|
# (the first finished container would kill the others).
|
|
#
|
|
# Recommended usage:
|
|
# ./scripts/test-clients.sh
|
|
#
|
|
# Or manually run each suite:
|
|
# docker compose -f docker-compose.test.yml up -d baradb
|
|
# docker compose -f docker-compose.test.yml run --rm test-python
|
|
# docker compose -f docker-compose.test.yml run --rm test-javascript
|
|
# docker compose -f docker-compose.test.yml run --rm test-nim
|
|
# docker compose -f docker-compose.test.yml run --rm test-rust
|
|
# docker compose -f docker-compose.test.yml down
|
|
|
|
services:
|
|
baradb:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: baradb:latest
|
|
ports:
|
|
- "9472:9472"
|
|
healthcheck:
|
|
test: ["CMD", "sh", "-c", "wget -qO- http://localhost:9912/health >/dev/null 2>&1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
test-python:
|
|
image: python:3.12-slim
|
|
depends_on:
|
|
baradb:
|
|
condition: service_healthy
|
|
environment:
|
|
- BARADB_HOST=baradb
|
|
- BARADB_PORT=9472
|
|
volumes:
|
|
- ./clients/python:/workspace
|
|
working_dir: /workspace
|
|
command: >
|
|
sh -c "
|
|
pip install pytest pytest-asyncio -q &&
|
|
pip install -e ".[dev]" -q &&
|
|
pytest tests/test_wire_protocol.py tests/test_query_builder.py -v &&
|
|
pytest tests/test_integration.py -v
|
|
"
|
|
|
|
test-javascript:
|
|
image: node:20-slim
|
|
depends_on:
|
|
baradb:
|
|
condition: service_healthy
|
|
environment:
|
|
- BARADB_HOST=baradb
|
|
- BARADB_PORT=9472
|
|
volumes:
|
|
- ./clients/javascript:/workspace
|
|
working_dir: /workspace
|
|
command: >
|
|
sh -c "
|
|
node --test tests/unit.test.js &&
|
|
node --test tests/integration.test.js
|
|
"
|
|
|
|
test-nim:
|
|
image: nimlang/nim:2.2.10
|
|
depends_on:
|
|
baradb:
|
|
condition: service_healthy
|
|
environment:
|
|
- BARADB_HOST=baradb
|
|
- BARADB_PORT=9472
|
|
volumes:
|
|
- ./clients/nim:/workspace
|
|
- ./clients/nim/src:/workspace/src
|
|
working_dir: /workspace
|
|
command: >
|
|
sh -c "
|
|
nim c --path:src -r tests/test_client.nim &&
|
|
nim c --path:src -r tests/test_integration.nim
|
|
"
|
|
|
|
test-rust:
|
|
image: rust:1.78
|
|
depends_on:
|
|
baradb:
|
|
condition: service_healthy
|
|
environment:
|
|
- BARADB_HOST=baradb
|
|
- BARADB_PORT=9472
|
|
volumes:
|
|
- ./clients/rust:/workspace
|
|
working_dir: /workspace
|
|
command: >
|
|
sh -c "
|
|
cargo test -- --test-threads=1
|
|
"
|