-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ci: copy how internal/vcs sets a clean env for git tests
Otherwise any users who have a git config that signs commits automatically with a password prompt, like Paul, would run into trouble as the tests would attempt such a prompt. Expose the test helper in vcs to reuse it. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Iafb14a06a12868231be6f2ffb39d50387c4c8f52 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198298 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
- Loading branch information
Showing
3 changed files
with
42 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ import ( | |
|
||
"github.com/go-quicktest/qt" | ||
"golang.org/x/tools/txtar" | ||
|
||
"cuelang.org/go/internal/vcs" | ||
) | ||
|
||
func TestCommits(t *testing.T) { | ||
|
@@ -36,6 +38,7 @@ func TestCommits(t *testing.T) { | |
t.Logf("commit:\n%s", commit) | ||
|
||
dir := t.TempDir() | ||
vcs.InitTestEnv(t) | ||
mustRunCmd(t, dir, "git", "init") | ||
mustRunCmd(t, dir, "git", | ||
"-c", "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters