(t *testing.T)
| 785 | } |
| 786 | |
| 787 | func TestClientRemotePushDefaultPropagatesGitError(t *testing.T) { |
| 788 | // Given a client whose repository directory no longer exists |
| 789 | repo := newTestRepo(t) |
| 790 | require.NoError(t, os.RemoveAll(repo.dir)) |
| 791 | |
| 792 | // When remote.pushDefault is read |
| 793 | remote, err := repo.client.RemotePushDefault(t.Context()) |
| 794 | |
| 795 | // Then the repository error is preserved |
| 796 | require.Error(t, err) |
| 797 | var gitError *GitError |
| 798 | require.ErrorAs(t, err, &gitError) |
| 799 | assert.Equal(t, 128, gitError.ExitCode) |
| 800 | assert.Empty(t, remote) |
| 801 | } |
| 802 | |
| 803 | func TestClientPushRevisionReturnsPushRemoteTrackingRef(t *testing.T) { |
| 804 | // Given a branch that fetches from upstream but pushes to origin |
nothing calls this directly
no test coverage detected