(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func 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: `--- |
| 31 | on: issues |
| 32 | engine: claude |
| 33 | tools: |
| 34 | github: |
| 35 | --- |
| 36 | |
| 37 | # Test |
| 38 | Test 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: `--- |
| 47 | on: issues |
| 48 | engine: claude |
| 49 | tools: |
| 50 | github: |
| 51 | mode: remote |
| 52 | --- |
| 53 | |
| 54 | # Test |
| 55 | Test 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: `--- |
| 64 | on: issues |
| 65 | strict: false |
| 66 | engine: claude |
| 67 | mcp-servers: |
| 68 | custom-tool: |
| 69 | container: myorg/custom-mcp:v1.0.0 |
| 70 | allowed: ["*"] |
| 71 | --- |
| 72 | |
| 73 | # Test |
| 74 | Test workflow with custom MCP container.`, |
nothing calls this directly
no test coverage detected