-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_simple.py
More file actions
executable file
·59 lines (48 loc) · 1.55 KB
/
test_simple.py
File metadata and controls
executable file
·59 lines (48 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python3
"""
Simple test to verify MCP server can start
"""
import os
import sys
import asyncio
# Check environment variables
print("Checking environment variables...")
required_vars = ['ALLURE_TESTOPS_URL', 'ALLURE_TOKEN', 'PROJECT_ID']
missing = []
for var in required_vars:
value = os.environ.get(var)
if value:
# Mask sensitive values
if 'TOKEN' in var:
display_value = value[:10] + "..." if len(value) > 10 else "***"
else:
display_value = value
print(f" ✓ {var}: {display_value}")
else:
print(f" ✗ {var}: NOT SET")
missing.append(var)
if missing:
print(f"\nERROR: Missing required environment variables: {', '.join(missing)}")
print("\nSet them with:")
print(" export ALLURE_TESTOPS_URL='https://your-instance.com'")
print(" export ALLURE_TOKEN='your-token'")
print(" export PROJECT_ID='1'")
sys.exit(1)
# Try to import modules
print("\nChecking imports...")
try:
from allure_client import AllureClient, create_allure_client
print(" ✓ allure_client imported")
except ImportError as e:
print(f" ✗ Failed to import allure_client: {e}")
sys.exit(1)
try:
from index import server, all_tools
print(" ✓ index imported")
print(f" ✓ Server initialized with {len(all_tools)} tools")
except ImportError as e:
print(f" ✗ Failed to import index: {e}")
sys.exit(1)
print("\n✓ Basic checks passed! Server should be ready to run.")
print("\nTo test the server, run:")
print(" poetry run python index.py")