Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGitRepoWithOrigin ¶ added in v0.0.10
InitGitRepoWithOrigin git-inits dir, makes an initial (empty) commit, and adds an origin remote so it satisfies `project add`'s upstream_url capture requirement (see docs/plans/git-gateway-cutover.md PR2: a project with no git origin remote is now rejected at registration time). The origin URL is a fixed placeholder — tests exercising this helper only need `project add` / `project reload` to see *some* origin, never a real fetchable remote.
The initial commit exists so `git rev-parse --abbrev-ref HEAD` (used by orchestrator.ExpandBaseBranch's ${current_branch} expansion) resolves: a freshly `git init`'d repo with zero commits has an unborn HEAD, which rev-parse rejects with exit 128 ("ambiguous argument 'HEAD'"). That was invisible for non-canonical task behaviors before the git gateway cutover closed the gap where they could keep an empty base_branch — see internal/api/task_create.go's CreateTask comment. -c user.name/user.email are passed explicitly rather than relying on ambient git config, which a bare CI runner may not have.
Types ¶
type MockSandbox ¶
type MockSandbox struct {
SetupCalled bool
Config sandbox.SandboxConfig
ShellCalls []string
CleanedUp bool
}
func (*MockSandbox) Cleanup ¶
func (m *MockSandbox) Cleanup() error
func (*MockSandbox) Setup ¶
func (m *MockSandbox) Setup(cfg sandbox.SandboxConfig) error
type TestServer ¶
TestServer wraps a running server for testing.
func NewTestServer ¶
func NewTestServer(t *testing.T) *TestServer
NewTestServer starts a server with a temp UNIX socket and in-memory DB.