Files
wevads-arsenal/run-tests.sh

41 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
echo "🧪 TESTS WEVADS ARSENAL BACKEND - PORT 5890"
echo "============================================"
echo ""
echo "1. ✅ PORT ACCESS:"
curl -s -o /dev/null -w "Port 5890: %{http_code}\n" http://127.0.0.1:5890/
echo ""
echo "2. ✅ MAIN API:"
API_STATUS=$(curl -s "http://127.0.0.1:5890/api/wevads.php?action=status")
echo "$API_STATUS" | grep -o '"status":"[^"]*"' || echo "$API_STATUS" | head -5
echo ""
echo "3. ✅ SMS API:"
SMS_STATS=$(curl -s "http://127.0.0.1:5890/api/sms.php?action=stats&api_key=wevads_sms_2024")
echo "$SMS_STATS" | grep -o '"period":"[^"]*"' || echo "$SMS_STATS" | head -5
echo ""
echo "4. ✅ TRACKING API:"
TRACKING=$(curl -s "http://127.0.0.1:5890/api/tracking.php")
echo "$TRACKING" | grep -o '"service":"[^"]*"' || echo "$TRACKING" | head -5
echo ""
echo "5. ✅ DATABASE TABLES:"
sudo -u postgres psql -d wevads_arsenal -c "
SELECT
'📊 ' || table_name as table_info,
(SELECT COUNT(*) FROM information_schema.tables t2 WHERE t2.table_name = t1.table_name) as exists
FROM (
SELECT 'sms_log' as table_name UNION
SELECT 'tracking_events' UNION
SELECT 'phone_numbers' UNION
SELECT 'sms_campaigns' UNION
SELECT 'reputation_checks' UNION
SELECT 'accounts_created'
) t1;" 2>/dev/null
echo ""
echo "🎯 BACKEND WEVADS ARSENAL - PORT 5890 OPERATIONNEL"