Documentation
¶
Index ¶
- type TestRepo
- func (tr *TestRepo) AddAndCommit(message string)
- func (tr *TestRepo) AssertCurrentBranch(expected string)
- func (tr *TestRepo) AssertFileContains(path, expectedContent string)
- func (tr *TestRepo) AssertFileExists(path string)
- func (tr *TestRepo) Checkout(branch string)
- func (tr *TestRepo) Cleanup()
- func (tr *TestRepo) CreateBasicHitchMetadata()
- func (tr *TestRepo) CreateBranch(name string)
- func (tr *TestRepo) CreateCustomHitchMetadata(environments map[string]string)
- func (tr *TestRepo) CreateFile(path, content string)
- func (tr *TestRepo) GetCurrentBranch() string
- func (tr *TestRepo) RunGit(args ...string) string
- func (tr *TestRepo) SetupGitConfig()
- func (tr *TestRepo) WriteHitchFile(content string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestRepo ¶
TestRepo provides a clean, simple test repository
func NewTestRepo ¶
NewTestRepo creates a fresh test repository for each test
func (*TestRepo) AddAndCommit ¶
AddAndCommit adds a file and commits it
func (*TestRepo) AssertCurrentBranch ¶
AssertCurrentBranch verifies we are on the expected branch
func (*TestRepo) AssertFileContains ¶
AssertFileContains verifies a file contains specific content
func (*TestRepo) AssertFileExists ¶
AssertFileExists verifies a file exists in the repository
func (*TestRepo) CreateBasicHitchMetadata ¶
func (tr *TestRepo) CreateBasicHitchMetadata()
CreateBasicHitchMetadata creates a simple Hitch metadata with default environments
func (*TestRepo) CreateBranch ¶
CreateBranch creates a new branch from the current HEAD
func (*TestRepo) CreateCustomHitchMetadata ¶
CreateCustomHitchMetadata creates Hitch metadata with custom environments
func (*TestRepo) CreateFile ¶
CreateFile creates a file with the given content
func (*TestRepo) GetCurrentBranch ¶
GetCurrentBranch returns the current branch name
func (*TestRepo) SetupGitConfig ¶
func (tr *TestRepo) SetupGitConfig()
SetupGitConfig configures git user for the test repository
func (*TestRepo) WriteHitchFile ¶
WriteHitchFile creates a basic .hitch directory and metadata file