fix(test): add user email and name to support ci/cd
This commit is contained in:
@@ -22,6 +22,10 @@ func TestGitSuggestions(t *testing.T) {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
// Initialize git repo
|
// Initialize git repo
|
||||||
_ = exec.CommandContext(ctx, "git", "init").Run()
|
_ = exec.CommandContext(ctx, "git", "init").Run()
|
||||||
|
|
||||||
|
_ = exec.CommandContext(ctx, "git", "config", "user.email", "iris-test@example.com").Run() // this is for ci/cd
|
||||||
|
_ = exec.CommandContext(ctx, "git", "config", "user.name", "Iris Test").Run() // this is for ci/cd
|
||||||
|
|
||||||
_ = os.WriteFile(filepath.Join(tmp, "file.go"), []byte("package main"), 0644)
|
_ = os.WriteFile(filepath.Join(tmp, "file.go"), []byte("package main"), 0644)
|
||||||
_ = exec.CommandContext(ctx, "git", "add", ".").Run()
|
_ = exec.CommandContext(ctx, "git", "add", ".").Run()
|
||||||
_ = exec.CommandContext(ctx, "git", "commit", "-m", "initial").Run()
|
_ = exec.CommandContext(ctx, "git", "commit", "-m", "initial").Run()
|
||||||
|
|||||||
Reference in New Issue
Block a user