godcrm/scripts/test-postgres-backend.sh
GOD CRM Release f89e074dd1
Some checks failed
CI / Lint / Typecheck / Test / Build (push) Has been cancelled
CI / PostgreSQL Integration Tests (push) Has been cancelled
GOD CRM — public scrubbed snapshot
Governed substrate for autonomous agents: scoped identity (passports),
audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
2026-08-10 04:01:45 +03:00

31 lines
759 B
Bash
Executable file

#!/bin/bash
# Test PostgreSQL backend
export DATABASE_TYPE=postgres
export POSTGRES_URL="postgresql://godcrm:godcrm_dev_2026@localhost:5432/godcrm"
export PORT=5099
cd /root/workspace/business-crm
# Start server in background
node backend/server.js &
SERVER_PID=$!
sleep 3
echo "=== Testing API with PostgreSQL ==="
# Test login
echo "Testing /api/v3/auth/login..."
RESULT=$(curl -s http://127.0.0.1:$PORT/api/v3/auth/login -X POST -H "Content-Type: application/json" -d '{"email":"gera69lvl@gmail.com","password":"123456"}')
echo "$RESULT" | head -c 500
echo ""
# Check if login successful
if echo "$RESULT" | grep -q "token"; then
echo "✅ Login works with PostgreSQL!"
else
echo "❌ Login failed"
fi
# Kill server
kill $SERVER_PID 2>/dev/null