借鉴 DBX:安装检测(Node/npm/包/Go 二进制)、只读与 allow_dangerous、 连接白名单、多客户端配置片段;GET/PUT /api/ai/mcp-policy、/mcp-install; 文档 /docs/mcp 与落地页 AI/MCP 块;对照 docs/16 勾选设置项、列仍未完清单。
16 lines
404 B
Go
16 lines
404 B
Go
package aitools
|
|
|
|
import "testing"
|
|
|
|
func TestProbeMCPInstallSmoke(t *testing.T) {
|
|
info := ProbeMCPInstall()
|
|
if info.InstallCommand == "" {
|
|
t.Fatal("empty install command")
|
|
}
|
|
if info.Status == "" {
|
|
t.Fatal("empty status")
|
|
}
|
|
t.Logf("status=%s node=%s npm=%v go=%v path=%s latest=%s",
|
|
info.Status, info.NodeVersion, info.NpmAvailable, info.GoBinaryFound, info.GoBinaryPath, info.LatestVersion)
|
|
}
|