40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
import sys
|
|
import importlib.util
|
|
import time
|
|
|
|
try:
|
|
spec = importlib.util.spec_from_file_location(
|
|
"opax_mcp_client",
|
|
"/home/chris_christiansen/OSVauco/agents/core-logic/opax_mcp_client.py"
|
|
)
|
|
opax_mcp_client = importlib.util.module_from_spec(spec)
|
|
spec.loader.exec_module(opax_mcp_client)
|
|
|
|
print("--- Running push_file test ---")
|
|
content = '''# Ping
|
|
Verifisert write-path: opax-mcp → Gitea → Cloud Build
|
|
Tidspunkt: 2026-07-02 00:00 CEST'''
|
|
push_params = {
|
|
'path': 'test/ping-2026-07-02.md',
|
|
'content': content,
|
|
'message': 'test: verify end-to-end write path'
|
|
}
|
|
|
|
push_result = opax_mcp_client.call_tool("push_file", push_params)
|
|
print("--- push_file Result ---")
|
|
print(push_result)
|
|
|
|
print()
|
|
print("--- Waiting 5 seconds for build to trigger ---")
|
|
time.sleep(5)
|
|
|
|
print()
|
|
print("--- Checking Cloud Build status ---")
|
|
build_status = opax_mcp_client.get_build_status()
|
|
print("--- get_build_status Result ---")
|
|
print(build_status)
|
|
|
|
except Exception as e:
|
|
print(f"An error occurred: {e}")
|
|
sys.exit(1)
|