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

Function TestDockerImagePredownload

pkg/workflow/docker_predownload_test.go:17–174  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15)
16
17func TestDockerImagePredownload(t *testing.T) {
18 pinnedGhAwNodeImage := resolveContainerImage(constants.DefaultGhAwNodeImage, nil)
19
20 // Representative sample - tests key docker image predownload scenarios
21 tests := []struct {
22 name string
23 frontmatter string
24 expectedImages []string
25 manifestImages []string
26 expectStep bool
27 }{
28 {
29 name: "GitHub tool generates image download step",
30 frontmatter: `---
31on: issues
32engine: claude
33tools:
34 github:
35---
36
37# Test
38Test workflow.`,
39 expectedImages: []string{
40 "ghcr.io/github/github-mcp-server:" + string(constants.DefaultGitHubMCPServerVersion),
41 },
42 expectStep: true,
43 },
44 {
45 name: "GitHub remote mode does not generate GitHub MCP docker image but still downloads MCP gateway",
46 frontmatter: `---
47on: issues
48engine: claude
49tools:
50 github:
51 mode: remote
52---
53
54# Test
55Test workflow.`,
56 expectedImages: []string{
57 "ghcr.io/github/gh-aw-mcpg:" + string(constants.DefaultMCPGatewayVersion),
58 },
59 expectStep: true,
60 },
61 {
62 name: "Custom MCP server with container",
63 frontmatter: `---
64on: issues
65strict: false
66engine: claude
67mcp-servers:
68 custom-tool:
69 container: myorg/custom-mcp:v1.0.0
70 allowed: ["*"]
71---
72
73# Test
74Test workflow with custom MCP container.`,

Callers

nothing calls this directly

Calls 9

CompileWorkflowMethod · 0.95
TempDirFunction · 0.92
MarkdownToLockFileFunction · 0.92
resolveContainerImageFunction · 0.85
NewCompilerFunction · 0.85
RunMethod · 0.45
ErrorfMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected