MCPcopy Index your code
hub / github.com/github/github-mcp-server / ensureDockerImageBuilt

Function ensureDockerImageBuilt

e2e/e2e_test.go:113–127  ·  view source on GitHub ↗

ensureDockerImageBuilt makes sure the Docker image is built only once across all tests

(t *testing.T)

Source from the content-addressed store, hash-verified

111
112// ensureDockerImageBuilt makes sure the Docker image is built only once across all tests
113func ensureDockerImageBuilt(t *testing.T) {
114 buildOnce.Do(func() {
115 t.Log("Building Docker image for e2e tests...")
116 cmd := exec.Command("docker", "build", "-t", "github/e2e-github-mcp-server", ".")
117 cmd.Dir = ".." // Run this in the context of the root, where the Dockerfile is located.
118 output, err := cmd.CombinedOutput()
119 buildError = err
120 if err != nil {
121 t.Logf("Docker build output: %s", string(output))
122 }
123 })
124
125 // Check if the build was successful
126 require.NoError(t, buildError, "expected to build Docker image successfully")
127}
128
129// clientOpts holds configuration options for the MCP client setup
130type clientOpts struct {

Callers 1

setupMCPClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected