(t *testing.T)
| 969 | } |
| 970 | |
| 971 | func TestBuildFromDevcontainerInRoot(t *testing.T) { |
| 972 | t.Parallel() |
| 973 | |
| 974 | // Ensures that a Git repository with a devcontainer.json is cloned and built. |
| 975 | srv := gittest.CreateGitServer(t, gittest.Options{ |
| 976 | Files: map[string]string{ |
| 977 | "devcontainer.json": `{ |
| 978 | "name": "Test", |
| 979 | "build": { |
| 980 | "dockerfile": "Dockerfile" |
| 981 | }, |
| 982 | }`, |
| 983 | "Dockerfile": "FROM " + testImageUbuntu, |
| 984 | }, |
| 985 | }) |
| 986 | ctr, err := runEnvbuilder(t, runOpts{env: []string{ |
| 987 | envbuilderEnv("GIT_URL", srv.URL), |
| 988 | }}) |
| 989 | require.NoError(t, err) |
| 990 | |
| 991 | output := execContainer(t, ctr, "echo hello") |
| 992 | require.Equal(t, "hello", strings.TrimSpace(output)) |
| 993 | } |
| 994 | |
| 995 | func TestBuildCustomCertificates(t *testing.T) { |
| 996 | t.Parallel() |
nothing calls this directly
no test coverage detected