Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit d3e5403

Browse files
Fix test when git is not set up
1 parent 9fc18f1 commit d3e5403

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/gps/vcs_source_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ func TestGitSourceListVersionsNoHEAD(t *testing.T) {
538538

539539
// Create test repo with a single commit on the master branch
540540
h.RunGit(repoPath, "init")
541-
h.RunGit(repoPath, "commit", "--allow-empty", `--message="Initial commit"`, `--author="Test author <[email protected]>"`)
541+
h.RunGit(repoPath, "config", "--local", "user.email", "[email protected]")
542+
h.RunGit(repoPath, "config", "--local", "user.name", "Test author")
543+
h.RunGit(repoPath, "commit", "--allow-empty", `--message="Initial commit"`)
542544

543545
// Make HEAD point at a nonexistent branch (deleting it is not allowed)
544546
// The `git ls-remote` that listVersions() calls will not return a HEAD ref

0 commit comments

Comments
 (0)