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

Function TestBuildFromDevcontainerInRoot

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

Source from the content-addressed store, hash-verified

969}
970
971func 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
995func TestBuildCustomCertificates(t *testing.T) {
996 t.Parallel()

Callers

nothing calls this directly

Calls 4

CreateGitServerFunction · 0.92
runEnvbuilderFunction · 0.85
envbuilderEnvFunction · 0.85
execContainerFunction · 0.85

Tested by

no test coverage detected