stubDiscoverTree registers the single recursive-tree call used by DiscoverSkills.
(reg *httpmock.Registry, owner, repo, sha, treeJSON string)
| 240 | |
| 241 | // stubDiscoverTree registers the single recursive-tree call used by DiscoverSkills. |
| 242 | func stubDiscoverTree(reg *httpmock.Registry, owner, repo, sha, treeJSON string) { |
| 243 | reg.Register( |
| 244 | httpmock.REST("GET", fmt.Sprintf("repos/%s/%s/git/trees/%s", owner, repo, sha)), |
| 245 | httpmock.StringResponse(fmt.Sprintf(`{"sha": %q, "tree": [%s]}`, sha, treeJSON)), |
| 246 | ) |
| 247 | } |
| 248 | |
| 249 | // stubInstallFiles registers subtree + blob stubs for installer.Install (one skill). |
| 250 | func stubInstallFiles(reg *httpmock.Registry, owner, repo, treeSHA, blobSHA, content string) { |
no test coverage detected