(reg *httpmock.Registry, owner, repo, path, content string)
| 2871 | `) |
| 2872 | |
| 2873 | func stubContentsAPI(reg *httpmock.Registry, owner, repo, path, content string) { |
| 2874 | encoded := base64.StdEncoding.EncodeToString([]byte(content)) |
| 2875 | reg.Register( |
| 2876 | httpmock.REST("GET", fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, url.PathEscape(path))), |
| 2877 | httpmock.StringResponse(fmt.Sprintf(`{"content": %q, "encoding": "base64"}`, encoded)), |
| 2878 | ) |
| 2879 | } |
| 2880 | |
| 2881 | func TestInstallRun_UpstreamDetection(t *testing.T) { |
| 2882 | tests := []struct { |
no test coverage detected