(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string)
| 300 | } |
| 301 | |
| 302 | func StubFetchRefSHA(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string) { |
| 303 | path := fmt.Sprintf("repos/%s/%s/git/ref/tags/%s", owner, repoName, tagName) |
| 304 | reg.Register( |
| 305 | httpmock.REST("GET", path), |
| 306 | httpmock.StringResponse(fmt.Sprintf(`{"object": {"sha": "%s"}}`, sha)), |
| 307 | ) |
| 308 | } |