-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_check.py
More file actions
35 lines (29 loc) · 817 Bytes
/
Copy pathtest_check.py
File metadata and controls
35 lines (29 loc) · 817 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
#!/usr/bin/env python3
"""测试 CHECK 操作以诊断连接问题"""
import sys
import json
import os
# 添加 src 到路径
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src"))
from yueshu_airbyte_connector.destination import check
from yueshu_airbyte_connector.common import to_destination_config
# 测试配置
test_config = {
"hosts": ["127.0.0.1:9669"],
"username": "root",
"password": "root",
"graph": "" # 留空或填写实际的 graph
}
print("=" * 60)
print("测试 CHECK 操作")
print("=" * 60)
print(f"配置: {json.dumps(test_config, indent=2)}")
print("=" * 60)
try:
check(test_config)
print("\n✅ CHECK 操作成功完成")
except Exception as e:
print(f"\n❌ CHECK 操作失败: {e}")
import traceback
traceback.print_exc()
sys.exit(1)