fix(test): add user email and name to support ci/cd

This commit is contained in:
verse91
2026-05-10 02:13:07 +07:00
parent f79cfa0e98
commit ae067fa200
+4
View File
@@ -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()