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

Function TestSucceedsGitAuthInURL

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

Source from the content-addressed store, hash-verified

473}
474
475func TestSucceedsGitAuthInURL(t *testing.T) {
476 t.Parallel()
477 srv := gittest.CreateGitServer(t, gittest.Options{
478 Files: map[string]string{
479 "Dockerfile": "FROM " + testImageAlpine,
480 },
481 Username: "kyle",
482 Password: "testing",
483 })
484
485 u, err := url.Parse(srv.URL)
486 require.NoError(t, err)
487 u.User = url.UserPassword("kyle", "testing")
488 ctr, err := runEnvbuilder(t, runOpts{env: []string{
489 envbuilderEnv("GIT_URL", u.String()),
490 envbuilderEnv("DOCKERFILE_PATH", "Dockerfile"),
491 }})
492 require.NoError(t, err)
493 gitConfig := execContainer(t, ctr, "cat /workspaces/empty/.git/config")
494 require.Contains(t, gitConfig, u.String())
495}
496
497func TestBuildFromDevcontainerWithFeatures(t *testing.T) {
498 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