getCurrentBranch gets the current branch name for the repository at repoPath
(t *testing.T, repoPath string)
| 709 | |
| 710 | // getCurrentBranch gets the current branch name for the repository at repoPath |
| 711 | func getCurrentBranch(t *testing.T, repoPath string) string { |
| 712 | t.Helper() |
| 713 | cmd := exec.Command("git", "-C", repoPath, "branch", "--show-current") |
| 714 | output, err := cmd.Output() |
| 715 | require.NoError(t, err, "failed to get current branch") |
| 716 | return strings.TrimSpace(string(output)) |
| 717 | } |
| 718 | |
| 719 | // assertFileExists checks if a file exists at the specified path relative to repoPath |
| 720 | func assertFileExists(t *testing.T, repoPath, relativePath string) { |
no outgoing calls
no test coverage detected