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

Function TestSucceedsGitAuth

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

Source from the content-addressed store, hash-verified

399}
400
401func TestSucceedsGitAuth(t *testing.T) {
402 t.Parallel()
403 srv := gittest.CreateGitServer(t, gittest.Options{
404 Files: map[string]string{
405 "Dockerfile": "FROM " + testImageAlpine,
406 },
407 Username: "kyle",
408 Password: "testing",
409 })
410 ctr, err := runEnvbuilder(t, runOpts{env: []string{
411 envbuilderEnv("GIT_URL", srv.URL),
412 envbuilderEnv("DOCKERFILE_PATH", "Dockerfile"),
413 envbuilderEnv("GIT_USERNAME", "kyle"),
414 envbuilderEnv("GIT_PASSWORD", "testing"),
415 }})
416 require.NoError(t, err)
417 gitConfig := execContainer(t, ctr, "cat /workspaces/empty/.git/config")
418 require.Contains(t, gitConfig, srv.URL)
419}
420
421func TestGitSSHAuth(t *testing.T) {
422 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