(t *testing.T)
| 277 | } |
| 278 | |
| 279 | func Test_RepoClone_missingSSHURL(t *testing.T) { |
| 280 | reg := &httpmock.Registry{} |
| 281 | defer reg.Verify(t) |
| 282 | reg.Register( |
| 283 | httpmock.GraphQL(`query RepositoryInfo\b`), |
| 284 | httpmock.StringResponse(` |
| 285 | { "data": { "repository": { |
| 286 | "name": "REPO", |
| 287 | "owner": {"login": "OWNER"} |
| 288 | } } } |
| 289 | `)) |
| 290 | |
| 291 | cfg := config.NewMockConfig() |
| 292 | cfg.Set("", "git_protocol", "ssh") |
| 293 | |
| 294 | _, err := runCloneCommandWithConfig(&http.Client{Transport: reg}, cfg, "OWNER/REPO") |
| 295 | require.EqualError(t, err, "invalid API response: repository OWNER/REPO is missing sshUrl") |
| 296 | } |
| 297 | |
| 298 | func Test_RepoClone_hasParent(t *testing.T) { |
| 299 | reg := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected