(t *testing.T)
| 1339 | } |
| 1340 | |
| 1341 | func TestClientPushReportsMissingRemote(t *testing.T) { |
| 1342 | // Given a repository with a local trunk commit but no remote |
| 1343 | repo := newTestRepo(t) |
| 1344 | repo.commit(t, "local commit") |
| 1345 | |
| 1346 | // When trunk is pushed to a missing remote |
| 1347 | err := repo.client.Push(t.Context(), "missing", "trunk") |
| 1348 | |
| 1349 | // Then Git reports a semantic command failure |
| 1350 | require.Error(t, err) |
| 1351 | var gitErr *GitError |
| 1352 | require.ErrorAs(t, err, &gitErr) |
| 1353 | assert.NotZero(t, gitErr.ExitCode) |
| 1354 | } |
| 1355 | |
| 1356 | func TestClientPushUsesAuthenticatedUpstreamCommand(t *testing.T) { |
| 1357 | // Given a client that records the Git command |
nothing calls this directly
no test coverage detected