fix(clients): repair Python & Rust tests, add container test orchestration
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
This commit is contained in:
2026-05-14 23:35:45 +03:00
parent c55d3080cf
commit 359f945170
14 changed files with 311 additions and 129 deletions
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# BaraDB — Client Integration Test Runner
# Spins up the BaraDB server in Docker and runs all client test suites sequentially.
#
# Usage:
# ./scripts/test-clients.sh
set -euo pipefail
COMPOSE="docker compose -f docker-compose.test.yml"
echo "=== Building BaraDB server image ==="
$COMPOSE build baradb
echo "=== Starting BaraDB server ==="
$COMPOSE up -d baradb
# Wait for server healthcheck
echo "=== Waiting for server to be healthy ==="
$COMPOSE ps baradb --format json 2>/dev/null | grep -q '"Health":"healthy"' || sleep 10
# Give a little extra time for the wire protocol port to be ready
sleep 3
run_test() {
local service=$1
echo ""
echo "========================================"
echo "=== Running $service tests ==="
echo "========================================"
if $COMPOSE run --rm "$service"; then
echo "$service tests PASSED"
else
echo "$service tests FAILED"
EXIT_CODE=1
fi
}
EXIT_CODE=0
run_test test-python
run_test test-javascript
run_test test-nim
run_test test-rust
echo ""
echo "========================================"
if [ "$EXIT_CODE" -eq 0 ]; then
echo "🎉 All client tests passed!"
else
echo "⚠️ Some client tests failed."
fi
echo "========================================"
echo "=== Stopping BaraDB server ==="
$COMPOSE down -v
exit $EXIT_CODE