Files
pfandsystem-demo/test-system.sh
christian d86c898455 chore: initial scaffold (Whitelabel-Fork von Pfandsystem)
- Source-Copy von /root/entwicklung/pfandsystem
- docker-compose.yml umgeschrieben: pfandsystem-demo-* Container, Ports 3308/8083/3003 (alle localhost)
- Traefik-Label fuer pfandsystem.dockly.de
- Erweitertes Multi-Tenant-Schema (tenants, tenant_id auf allen Tabellen)
- Neue Tabellen: kunden_bilder, geraete
- Neue Spalten: kunden.anlieferungshinweis, kunden.lieferzeit_bis
- Rollen: superadmin, admin, user, fahrer
- .env.example + README

Code-Refactor (Tailwind, Multi-Tenant-Middleware, Erweiterungen) folgt.
2026-05-26 12:39:17 +00:00

43 lines
1.1 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# System-Test-Script
echo "🧪 Pfandsystem Test-Suite"
echo "=========================="
echo ""
# 1. Container-Status
echo "1⃣ Container-Status:"
docker-compose ps
echo ""
# 2. Backend Health Check
echo "2⃣ Backend Health Check:"
curl -s http://localhost:3001/health || echo "❌ Backend nicht erreichbar"
echo ""
echo ""
# 3. MySQL-Verbindung
echo "3⃣ MySQL-Verbindung:"
docker exec pfandsystem-mysql mysql -u pfandsystem -ppfandsystem_secure_password -e "SELECT 'MySQL OK' as status;" 2>/dev/null || echo "❌ MySQL nicht erreichbar"
echo ""
# 4. Backend-Logs (letzte 10 Zeilen)
echo "4⃣ Backend-Logs (letzte 10 Zeilen):"
docker-compose logs --tail=10 backend
echo ""
# 5. Frontend erreichbar
echo "5⃣ Frontend Check:"
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" http://localhost:80
echo ""
# 6. API-Endpunkte testen
echo "6⃣ API-Endpunkte:"
echo " /api/auth/login:"
curl -s -o /dev/null -w " HTTP Status: %{http_code}\n" -X POST http://localhost:3001/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test","password":"test"}'
echo ""
echo "✅ Test abgeschlossen"