#!/bin/bash # MCP Voll-Tests — ON-DEMAND (NICHT naechtlich; manuell ausfuehren). # Funktional (test_all.py) + Edge-Cases (test_edge.py) + Stress/Concurrency (test_stress.py). # Schreibt Testdaten in die mcptest-Sandbox (calendar-test, contacts-test, /.mcp-tests*, Inbox). # # Nutzung: # /opt/mcp-servers/tests/run_full_tests.sh # alles # /opt/mcp-servers/tests/run_full_tests.sh -m stress # nur eine Schicht (pytest-Marker) set -uo pipefail LOG="/var/log/mcp-tests-full.log" VENV="/opt/mcp-servers/venv/bin" cd /opt/mcp-servers/tests || exit 1 echo "[$(date)] MCP Voll-Tests gestartet" | tee -a "$LOG" if [ "$#" -gt 0 ]; then # z.B. -m smoke | -m edge | -m stress (Marker-basiert ueber alle Dateien) OUTPUT=$($VENV/python -m pytest test_all.py test_edge.py test_stress.py "$@" -v --tb=short 2>&1) else OUTPUT=$($VENV/python -m pytest test_all.py test_edge.py test_stress.py -v --tb=short 2>&1) fi EXIT=$? echo "$OUTPUT" | tee -a "$LOG" echo "$OUTPUT" | tail -1 echo "[$(date)] MCP Voll-Tests fertig (exit $EXIT)" | tee -a "$LOG" exit $EXIT