MCPcopy Create free account
hub / github.com/github/gh-aw / TestDetectFromMCPScripts

Function TestDetectFromMCPScripts

pkg/workflow/runtime_setup_test.go:289–312  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

287}
288
289func 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
314func TestGenerateRuntimeSetupSteps(t *testing.T) {
315 tests := []struct {

Callers

nothing calls this directly

Calls 1

detectFromMCPScriptsFunction · 0.85

Tested by

no test coverage detected