Files
App/scripts/docker/test.sh
HiepLM 9776e29d7d
Some checks failed
Test / test (push) Has been cancelled
final TESTING
2026-06-13 14:11:42 +07:00

27 lines
547 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# shellcheck source=../lib/common.sh
source "$(dirname "$0")/../lib/common.sh"
BASE="${TEST_BASE_URL:-$LM_URL}"
export LM_URL="$BASE"
echo "==> Docker up"
"$(dirname "$0")/up.sh"
echo "==> Đợi server ($BASE)"
if ! wait_for_health "$BASE"; then
echo "Container không phản hồi tại $BASE" >&2
exit 1
fi
echo "==> API smoke"
"$LM_SCRIPTS/test/smoke.sh" "$BASE"
echo "==> pytest"
TEST_BASE_URL="$BASE" python3 -m pytest "$LM_ROOT/tests/test_api_integration.py" -q
echo
echo "Docker tests OK."