(t *testing.T)
| 822 | } |
| 823 | |
| 824 | func TestClientPushRevisionReportsUnresolvedBranch(t *testing.T) { |
| 825 | // Given a repository without the requested branch |
| 826 | repo := newTestRepo(t) |
| 827 | |
| 828 | // When its push revision is resolved |
| 829 | trackingRef, err := repo.client.PushRevision(t.Context(), "missing") |
| 830 | |
| 831 | // Then Git's revision error is returned |
| 832 | require.Error(t, err) |
| 833 | var gitError *GitError |
| 834 | require.ErrorAs(t, err, &gitError) |
| 835 | assert.NotZero(t, gitError.ExitCode) |
| 836 | assert.Empty(t, trackingRef) |
| 837 | } |
| 838 | |
| 839 | func TestParsePushRevisionReportsMalformedSymbolicRef(t *testing.T) { |
| 840 | // Given Git returns a symbolic push ref outside refs/remotes |
nothing calls this directly
no test coverage detected