(reg *httpmock.Registry, owner, repo, path, content string)
| 2714 | `) |
| 2715 | |
| 2716 | func stubContentsAPI(reg *httpmock.Registry, owner, repo, path, content string) { |
| 2717 | encoded := base64.StdEncoding.EncodeToString([]byte(content)) |
| 2718 | reg.Register( |
| 2719 | httpmock.REST("GET", fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, url.PathEscape(path))), |
| 2720 | httpmock.StringResponse(fmt.Sprintf(`{"content": %q, "encoding": "base64"}`, encoded)), |
| 2721 | ) |
| 2722 | } |
| 2723 | |
| 2724 | func TestInstallRun_UpstreamDetection(t *testing.T) { |
| 2725 | tests := []struct { |
no test coverage detected