stubDiscoverTree registers the single recursive-tree call used by DiscoverSkills.
(reg *httpmock.Registry, owner, repo, sha, treeJSON string)
| 227 | |
| 228 | // stubDiscoverTree registers the single recursive-tree call used by DiscoverSkills. |
| 229 | func stubDiscoverTree(reg *httpmock.Registry, owner, repo, sha, treeJSON string) { |
| 230 | reg.Register( |
| 231 | httpmock.REST("GET", fmt.Sprintf("repos/%s/%s/git/trees/%s", owner, repo, sha)), |
| 232 | httpmock.StringResponse(fmt.Sprintf(`{"sha": %q, "tree": [%s]}`, sha, treeJSON)), |
| 233 | ) |
| 234 | } |
| 235 | |
| 236 | // stubInstallFiles registers subtree + blob stubs for installer.Install (one skill). |
| 237 | func stubInstallFiles(reg *httpmock.Registry, owner, repo, treeSHA, blobSHA, content string) { |
no test coverage detected