MCPcopy Create free account
hub / github.com/coder/envbuilder / TestExitBuildOnFailure

Function TestExitBuildOnFailure

integration/integration_test.go:1128–1143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1126}
1127
1128func TestExitBuildOnFailure(t *testing.T) {
1129 t.Parallel()
1130 srv := gittest.CreateGitServer(t, gittest.Options{
1131 Files: map[string]string{
1132 "Dockerfile": "bad syntax",
1133 },
1134 })
1135 _, err := runEnvbuilder(t, runOpts{env: []string{
1136 envbuilderEnv("GIT_URL", srv.URL),
1137 envbuilderEnv("DOCKERFILE_PATH", "Dockerfile"),
1138 envbuilderEnv("FALLBACK_IMAGE", testImageAlpine),
1139 // Ensures that the fallback doesn't work when an image is specified.
1140 envbuilderEnv("EXIT_ON_BUILD_FAILURE", "true"),
1141 }})
1142 require.ErrorContains(t, err, "parsing dockerfile")
1143}
1144
1145func TestContainerEnv(t *testing.T) {
1146 t.Parallel()

Callers

nothing calls this directly

Calls 3

CreateGitServerFunction · 0.92
runEnvbuilderFunction · 0.85
envbuilderEnvFunction · 0.85

Tested by

no test coverage detected