(reg *httpmock.Registry, owner, repo, path, content string)
| 2747 | `) |
| 2748 | |
| 2749 | func stubContentsAPI(reg *httpmock.Registry, owner, repo, path, content string) { |
| 2750 | encoded := base64.StdEncoding.EncodeToString([]byte(content)) |
| 2751 | reg.Register( |
| 2752 | httpmock.REST("GET", fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, url.PathEscape(path))), |
| 2753 | httpmock.StringResponse(fmt.Sprintf(`{"content": %q, "encoding": "base64"}`, encoded)), |
| 2754 | ) |
| 2755 | } |
| 2756 | |
| 2757 | func TestInstallRun_UpstreamDetection(t *testing.T) { |
| 2758 | tests := []struct { |
no test coverage detected