Documentation
¶
Overview ¶
Package testutil builds throwaway Git registries for tests.
Importing it isolates git from the developer's configuration (see IsolateGit).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountGit ¶
CountGit routes the git commands of the test through a wrapper that records them, and returns a function listing the commands run since (their arguments, one string per command). It changes PATH: not for parallel tests.
func IsolateGit ¶
func IsolateGit()
IsolateGit makes every git command of the test process ignore the developer's global and system configuration (signing, hooks, templates, credential helpers…) and use a fixed identity. Test binaries that run git without importing this package call it from TestMain.
func Marketplace ¶
Marketplace returns a marketplace.json listing in-repo plugins under plugins/.
Types ¶
type Origin ¶
type Origin struct {
Dir string
// contains filtered or unexported fields
}
Origin is a non-bare Git repository acting as a remote registry.
func NewLargeOrigin ¶
NewLargeOrigin creates a registry of n plugins holding one skill each ("p<i>:s<i>"), with governance as skillcrew.yaml. It uses git fast-import, so registries of thousands of plugins are created in a second. The working tree is left empty to save disk space: run "git reset --hard" before Write and Commit.