Skip to content

Commit

Permalink
Merge pull request #16420 from csrwng/fix_builder_test
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 16420, 16440)

Use writeable HOME directory for builder unit test

Fixes test failure when running as user without HOME directory
  • Loading branch information
openshift-merge-robot authored Sep 20, 2017
2 parents 1c8041b + b60778f commit 8a9fd27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/build/builder/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestCheckRemoteGit(t *testing.T) {
w.WriteHeader(http.StatusUnauthorized)
}))
defer server.Close()
gitRepo := git.NewRepositoryWithEnv([]string{"GIT_ASKPASS=true"})
gitRepo := git.NewRepositoryWithEnv([]string{"GIT_ASKPASS=true", fmt.Sprintf("HOME=%s", os.TempDir())})

var err error
err = checkRemoteGit(gitRepo, server.URL, 10*time.Second)
Expand Down

0 comments on commit 8a9fd27

Please sign in to comment.