- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
73 lines
2.1 KiB
Python
73 lines
2.1 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Runner script for the real upload authentication test.
|
|
|
|
This script demonstrates how to run the real functionality test
|
|
and provides helpful output for debugging.
|
|
"""
|
|
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
def check_server_running():
|
|
"""Check if the server is running."""
|
|
import requests
|
|
try:
|
|
response = requests.get("http://127.0.0.1:8000/api/traces/status", timeout=5)
|
|
return response.status_code == 200
|
|
except:
|
|
return False
|
|
|
|
def main():
|
|
print("🚀 RPA Vision V3 - Real Upload Authentication Test Runner")
|
|
print("=" * 60)
|
|
|
|
# Check if server is running
|
|
if not check_server_running():
|
|
print("❌ Server is not running!")
|
|
print("\nTo start the server, run:")
|
|
print(" python server/api_upload.py")
|
|
print(" # or")
|
|
print(" ./run.sh --server")
|
|
print("\nThen run this test again.")
|
|
return 1
|
|
|
|
print("✅ Server is running")
|
|
|
|
# Run the test
|
|
print("\n🧪 Running real functionality test...")
|
|
try:
|
|
# Run as pytest
|
|
result = subprocess.run([
|
|
sys.executable, "-m", "pytest",
|
|
"test_upload_with_hardcoded_token.py::test_real_authentication_upload",
|
|
"-v", "-s"
|
|
], capture_output=False)
|
|
|
|
if result.returncode == 0:
|
|
print("\n🎉 All tests passed!")
|
|
return 0
|
|
else:
|
|
print("\n❌ Some tests failed.")
|
|
return result.returncode
|
|
|
|
except KeyboardInterrupt:
|
|
print("\n⏹️ Test interrupted by user")
|
|
return 1
|
|
except Exception as e:
|
|
print(f"\n💥 Error running test: {e}")
|
|
|
|
# Fallback: run directly
|
|
print("\n🔄 Trying direct execution...")
|
|
try:
|
|
result = subprocess.run([
|
|
sys.executable, "test_upload_with_hardcoded_token.py"
|
|
], capture_output=False)
|
|
return result.returncode
|
|
except Exception as e2:
|
|
print(f"💥 Direct execution also failed: {e2}")
|
|
return 1
|
|
|
|
if __name__ == "__main__":
|
|
exit(main()) |