(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string)
| 320 | } |
| 321 | |
| 322 | func StubFetchRefSHA(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string) { |
| 323 | path := fmt.Sprintf("repos/%s/%s/git/ref/tags%%2F%s", owner, repoName, tagName) |
| 324 | reg.Register( |
| 325 | httpmock.REST("GET", path), |
| 326 | httpmock.StringResponse(fmt.Sprintf(`{"object": {"sha": "%s"}}`, sha)), |
| 327 | ) |
| 328 | } |