Files
modelscope/scripts/test-api-endpoints.sh
ben 738e5fc991 feat(notion): 添加Notion数据库集成功能和相关脚本
添加Notion数据库集成配置和访问脚本,包括:
- 配置Notion MCP服务器设置
- 添加数据库查询、内容查看和添加功能
- 创建测试脚本和集成文档
2026-02-02 08:49:17 +00:00

44 lines
1.3 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 配置信息
GITEA_URL="https://gitea.tailnet-68f9.ts.net"
TOKEN="8d7d70f324796be650b79415303c31f567bf459b"
# 函数测试API端点
function test_endpoint() {
local endpoint=$1
echo "测试端点: $endpoint"
response=$(curl -s -w "\n%{http_code}" \
-H "Authorization: token $TOKEN" \
"$GITEA_URL$endpoint")
# 分离响应内容和HTTP状态码
http_status=$(echo "$response" | tail -n1)
response_body=$(echo "$response" | sed '$d')
echo "HTTP状态码: $http_status"
if [ "$http_status" -eq 200 ]; then
echo "✓ 成功 - 响应: $response_body"
elif [ "$http_status" -eq 404 ]; then
echo "✗ 未找到"
elif [ "$http_status" -eq 403 ] || [ "$http_status" -eq 401 ]; then
echo "✗ 访问被拒绝 (可能权限不足)"
else
echo "✗ 其他错误 - 响应: $response_body"
fi
echo "---"
}
echo "=== 测试Gitea Actions Runner API端点 ==="
echo ""
# 测试可能的API端点
test_endpoint "/api/v1/actions/runners"
test_endpoint "/api/v1/actions/runners/5"
test_endpoint "/api/v1/admin/runners"
test_endpoint "/api/v1/admin/runners/5"
test_endpoint "/api/v1/user/actions/runners"
test_endpoint "/api/v1/user/actions/runners/5"
test_endpoint "/api/v1/users/ben/actions/runners"
test_endpoint "/api/v1/repos/ben/modelscope/actions/runners"