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