(t *testing.T)
| 287 | } |
| 288 | |
| 289 | func TestDetectFromMCPScripts(t *testing.T) { |
| 290 | requirements := make(map[string]*RuntimeRequirement) |
| 291 | detectFromMCPScripts(&MCPScriptsConfig{ |
| 292 | Tools: map[string]*MCPScriptToolConfig{ |
| 293 | "js-tool": {Script: "return { ok: true }"}, |
| 294 | "py-tool": {Py: "print('ok')"}, |
| 295 | "go-tool": {Go: `fmt.Println("ok")`}, |
| 296 | "sh-tool": {Run: "echo ok"}, |
| 297 | }, |
| 298 | }, requirements) |
| 299 | |
| 300 | if _, ok := requirements["node"]; !ok { |
| 301 | t.Fatal("expected node runtime for script tool") |
| 302 | } |
| 303 | if _, ok := requirements["python"]; !ok { |
| 304 | t.Fatal("expected python runtime for py tool") |
| 305 | } |
| 306 | if _, ok := requirements["go"]; !ok { |
| 307 | t.Fatal("expected go runtime for go tool") |
| 308 | } |
| 309 | if _, ok := requirements["shell"]; ok { |
| 310 | t.Fatal("did not expect shell runtime requirement") |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | func TestGenerateRuntimeSetupSteps(t *testing.T) { |
| 315 | tests := []struct { |
nothing calls this directly
no test coverage detected