(reg *httpmock.Registry, owner, repo, path, content string)
| 2803 | `) |
| 2804 | |
| 2805 | func stubContentsAPI(reg *httpmock.Registry, owner, repo, path, content string) { |
| 2806 | encoded := base64.StdEncoding.EncodeToString([]byte(content)) |
| 2807 | reg.Register( |
| 2808 | httpmock.REST("GET", fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, url.PathEscape(path))), |
| 2809 | httpmock.StringResponse(fmt.Sprintf(`{"content": %q, "encoding": "base64"}`, encoded)), |
| 2810 | ) |
| 2811 | } |
| 2812 | |
| 2813 | func TestInstallRun_UpstreamDetection(t *testing.T) { |
| 2814 | tests := []struct { |
no test coverage detected