(t *testing.T)
| 1429 | } |
| 1430 | |
| 1431 | func TestClientCloneReportsMissingRepository(t *testing.T) { |
| 1432 | // Given a local repository URL that does not exist |
| 1433 | IsolateConfig(t) |
| 1434 | missingURL := fileURL(filepath.Join(t.TempDir(), "missing.git")) |
| 1435 | client := &Client{} |
| 1436 | |
| 1437 | // When the repository is cloned |
| 1438 | target, err := client.Clone(t.Context(), missingURL, nil, WithRepoDir(t.TempDir())) |
| 1439 | |
| 1440 | // Then Git reports a semantic command failure and no target |
| 1441 | require.Error(t, err) |
| 1442 | var gitErr *GitError |
| 1443 | require.ErrorAs(t, err, &gitErr) |
| 1444 | assert.NotZero(t, gitErr.ExitCode) |
| 1445 | assert.Empty(t, target) |
| 1446 | } |
| 1447 | |
| 1448 | func TestClientCloneUsesHostScopedAuthenticatedCommand(t *testing.T) { |
| 1449 | // Given a client that records the Git command |
nothing calls this directly
no test coverage detected