(t *testing.T)
| 175 | } |
| 176 | |
| 177 | func TestGetShortCommitHash_HEAD(t *testing.T) { |
| 178 | tmpDir := t.TempDir() |
| 179 | setupGitRepo(t, tmpDir) |
| 180 | |
| 181 | createFile(t, tmpDir, "test.txt", "content") |
| 182 | gitAdd(t, tmpDir, "test.txt") |
| 183 | gitCommit(t, tmpDir, "Initial commit") |
| 184 | |
| 185 | shortHash, err := GetShortCommitHash(tmpDir, "HEAD") |
| 186 | |
| 187 | require.NoError(t, err) |
| 188 | assert.NotEmpty(t, shortHash) |
| 189 | } |
| 190 | |
| 191 | func TestGetShortCommitHash_InvalidCommit(t *testing.T) { |
| 192 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected