-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_setup.py
More file actions
37 lines (26 loc) · 962 Bytes
/
test_setup.py
File metadata and controls
37 lines (26 loc) · 962 Bytes
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
import os
import sys
from agent_utilities import initialize_graph_from_workspace
def test_template_in_process():
print("Testing gitlab-api setup for in-process MCP...")
os.environ.pop("MCP_URL", None)
os.environ.pop("MCP_CONFIG", None)
graph, config = initialize_graph_from_workspace()
mcp_toolsets = config.get("mcp_toolsets", [])
print(f"Number of toolsets: {len(mcp_toolsets)}")
if not mcp_toolsets:
print("FAIL: No toolsets found!")
sys.exit(1)
found_fastmcp = False
for ts in mcp_toolsets:
if hasattr(ts, "name") and ts.name == "GitLab":
print(f"SUCCESS: Found in-process toolset: {ts}")
found_fastmcp = True
break
if not found_fastmcp:
print("FAIL: In-process GitLab MCP toolset not found in config.")
sys.exit(1)
else:
print("Template verification PASSED.")
if __name__ == "__main__":
test_template_in_process()