(t *testing.T)
| 923 | } |
| 924 | |
| 925 | func TestBuildFromCustomWorkspaceBaseDir(t *testing.T) { |
| 926 | t.Parallel() |
| 927 | |
| 928 | // Ensures that a Git repository with a devcontainer.json is cloned and built. |
| 929 | srv := gittest.CreateGitServer(t, gittest.Options{ |
| 930 | Files: map[string]string{ |
| 931 | "Dockerfile": "FROM " + testImageUbuntu, |
| 932 | }, |
| 933 | }) |
| 934 | ctr, err := runEnvbuilder(t, runOpts{ |
| 935 | env: []string{ |
| 936 | envbuilderEnv("DOCKERFILE_PATH", "Dockerfile"), |
| 937 | envbuilderEnv("WORKSPACE_BASE_DIR", "/foo"), |
| 938 | envbuilderEnv("GIT_URL", srv.URL), |
| 939 | }, |
| 940 | }) |
| 941 | require.NoError(t, err) |
| 942 | |
| 943 | output := execContainer(t, ctr, "readlink /proc/1/cwd") |
| 944 | require.Contains(t, output, "/foo/") |
| 945 | } |
| 946 | |
| 947 | func TestBuildFromDevcontainerInSubfolder(t *testing.T) { |
| 948 | t.Parallel() |
nothing calls this directly
no test coverage detected