Documentation
¶
Index ¶
- Constants
- func AssertBranchExists(t *testing.T, env *TestEnv, name string)
- func AssertBranchNotExists(t *testing.T, env *TestEnv, name string)
- func AssertBranchParent(t *testing.T, env *TestEnv, name, expectedParent string)
- func AssertCommitsAhead(t *testing.T, env *TestEnv, branch, base string, expected int)
- func CreateBranch(t *testing.T, env *TestEnv, name, parent string)
- func CreateBranchWithCommit(t *testing.T, env *TestEnv, name, parent string)
- func GitCommit(t *testing.T, dir, filename, content, message string)
- func GitCommitMultiple(t *testing.T, dir string, count int, prefix string)
- func NewGit(env *TestEnv) *git.Git
- func NewGitInWorktree(env *TestEnv, branchName string) *git.Git
- func RunGhCommand(t *testing.T, env *TestEnv, args ...string) (string, error)
- type TestEnv
Constants ¶
View Source
const ( TestUserEmail = "test@test.com" TestUserName = "Test User" TestRepoOrg = "testorg" TestRepoName = "testrepo" )
Constants for testing
Variables ¶
This section is empty.
Functions ¶
func AssertBranchExists ¶
AssertBranchExists asserts that a branch exists in the stack
func AssertBranchNotExists ¶
AssertBranchNotExists asserts that a branch does not exist in the stack
func AssertBranchParent ¶
AssertBranchParent asserts that a branch has the expected parent
func AssertCommitsAhead ¶
AssertCommitsAhead asserts the number of commits ahead
func CreateBranch ¶
CreateBranch creates a branch using the stack manager
func CreateBranchWithCommit ¶
CreateBranchWithCommit creates a branch and adds a commit to it
func GitCommitMultiple ¶
GitCommitMultiple creates multiple commits in the specified directory
func NewGitInWorktree ¶
NewGitInWorktree creates a new git instance for a worktree
Types ¶
type TestEnv ¶
type TestEnv struct {
TmpDir string
RepoDir string
WorktreeDir string
ConfigDir string
StubBinDir string
OriginalHome string
OriginalPath string
}
TestEnv holds the test environment configuration
func SetupTestEnv ¶
SetupTestEnv creates a complete test environment with git repo, config, and stub gh
Click to show internal directories.
Click to hide internal directories.