Documentation
¶
Overview ¶
Package stacktest provides an in-memory stack backend for tests. Branch creation and checkout happen in the real temporary repository; the graph lives in memory.
Index ¶
- type Backend
- func (b *Backend) Abort(context.Context, git.Repo) error
- func (b *Backend) AddTop(ctx context.Context, repo git.Repo, name string) error
- func (b *Backend) Continue(context.Context, git.Repo) error
- func (b *Backend) Graph() *stack.Graph
- func (b *Backend) InitStack(ctx context.Context, repo git.Repo, trunk string, branches []string) error
- func (b *Backend) Load(context.Context, git.Repo) (*stack.Graph, error)
- func (b *Backend) Restack(_ context.Context, _ git.Repo, scope stack.Scope) error
- func (b *Backend) SetGraph(g *stack.Graph)
- func (b *Backend) Submit(_ context.Context, _ git.Repo, o stack.SubmitOptions) (stack.SubmitResult, error)
- func (b *Backend) Sync(_ context.Context, _ git.Repo, o stack.SyncOptions) (stack.SyncResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// Restacks records the scopes requested. RestackErr, when set, is
// returned by Restack.
Restacks []stack.Scope
RestackErr error
Continued int
Aborted int
// Submits records submit options; SubmitFn, when set, runs on submit.
Submits []stack.SubmitOptions
SubmitFn func(o stack.SubmitOptions) error
Syncs []stack.SyncOptions
SyncOut string
// contains filtered or unexported fields
}
Backend implements every stack port in memory.