Stage 3.4
This commit is contained in:
50
test/scripts/test_all.sh
Normal file
50
test/scripts/test_all.sh
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "============================================================"
|
||||
echo " EVENTHUB FULL API TEST SUITE"
|
||||
echo "============================================================"
|
||||
echo ""
|
||||
|
||||
SCRIPTS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Проверяем, что сервер запущен
|
||||
if ! curl -s "http://localhost:8080/health" | grep -q "ok"; then
|
||||
echo "❌ Server is not running. Please start the server first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PASSED=0
|
||||
FAILED=0
|
||||
|
||||
run_test() {
|
||||
echo ""
|
||||
echo "▶ Running $1..."
|
||||
if bash "$SCRIPTS_DIR/$1"; then
|
||||
((PASSED++))
|
||||
echo "✅ $1 PASSED"
|
||||
else
|
||||
((FAILED++))
|
||||
echo "❌ $1 FAILED"
|
||||
fi
|
||||
}
|
||||
|
||||
run_test "test_auth_api.sh"
|
||||
run_test "test_calendar_api.sh"
|
||||
run_test "test_event_api.sh"
|
||||
run_test "test_booking_api.sh"
|
||||
|
||||
echo ""
|
||||
echo "============================================================"
|
||||
echo " TEST SUMMARY"
|
||||
echo "============================================================"
|
||||
echo "Passed: $PASSED"
|
||||
echo "Failed: $FAILED"
|
||||
echo "============================================================"
|
||||
|
||||
if [ $FAILED -eq 0 ]; then
|
||||
echo "🎉 ALL TESTS PASSED!"
|
||||
exit 0
|
||||
else
|
||||
echo "❌ SOME TESTS FAILED"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user