testcommands

package
v0.40.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package testcommands TODO: kill off this package, replace with the non-test commands directly

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	BranchName string
}

func (Branch) CommandString

func (b Branch) CommandString() string

CommandString describes the Branch command for debugging purposes.

func (Branch) Exec

func (b Branch) Exec(_ *testing.T, dEnv *env.DoltEnv) error

Exec executes a Branch command on a test dolt environment.

type Checkout

type Checkout struct {
	BranchName string
}

func (Checkout) CommandString

func (c Checkout) CommandString() string

CommandString describes the Checkout command for debugging purposes.

func (Checkout) Exec

func (c Checkout) Exec(_ *testing.T, dEnv *env.DoltEnv) error

Exec executes a Checkout command on a test dolt environment.

type Command

type Command interface {
	CommandString() string
	Exec(t *testing.T, dEnv *env.DoltEnv) error
}

type CommitAll

type CommitAll struct {
	Message string
}

func (CommitAll) CommandString

func (c CommitAll) CommandString() string

CommandString describes the CommitAll command for debugging purposes.

func (CommitAll) Exec

func (c CommitAll) Exec(t *testing.T, dEnv *env.DoltEnv) error

Exec executes a CommitAll command on a test dolt environment.

type CommitStaged

type CommitStaged struct {
	Message string
}

func (CommitStaged) CommandString

func (c CommitStaged) CommandString() string

CommandString describes the CommitStaged command for debugging purposes.

func (CommitStaged) Exec

func (c CommitStaged) Exec(t *testing.T, dEnv *env.DoltEnv) error

Exec executes a CommitStaged command on a test dolt environment.

type ConflictsCat

type ConflictsCat struct {
	TableName string
}

func (ConflictsCat) CommandString

func (c ConflictsCat) CommandString() string

CommandString describes the ConflictsCat command for debugging purposes.

func (ConflictsCat) Exec

func (c ConflictsCat) Exec(t *testing.T, wg *sync.WaitGroup, dEnv *env.DoltEnv) error

Exec executes a ConflictsCat command on a test dolt environment.

type Merge

type Merge struct {
	BranchName string
}

func (Merge) CommandString

func (m Merge) CommandString() string

CommandString describes the Merge command for debugging purposes.

func (Merge) Exec

func (m Merge) Exec(t *testing.T, dEnv *env.DoltEnv) error

Exec executes a Merge command on a test dolt environment.

type MultiRepoTestSetup

type MultiRepoTestSetup struct {
	MrEnv   env.MultiRepoEnv
	Remote  string
	DoltDBs map[string]*doltdb.DoltDB
	DbNames []string
	Root    string
	DbPaths map[string]string
	Home    string
	Remotes map[string]env.Remote
	Errhand func(args ...interface{})
}

func NewMultiRepoTestSetup

func NewMultiRepoTestSetup(errhand func(args ...interface{})) *MultiRepoTestSetup

TODO this is not a proper builder, dbs need to be added before remotes

func (*MultiRepoTestSetup) CheckoutBranch

func (mr *MultiRepoTestSetup) CheckoutBranch(dbName, branchName string)

func (*MultiRepoTestSetup) Cleanup

func (mr *MultiRepoTestSetup) Cleanup(dbName string)

func (*MultiRepoTestSetup) CloneDB

func (mr *MultiRepoTestSetup) CloneDB(fromRemote, dbName string)

func (*MultiRepoTestSetup) CommitWithWorkingSet

func (mr *MultiRepoTestSetup) CommitWithWorkingSet(dbName string) *doltdb.Commit

func (*MultiRepoTestSetup) CreateTable

func (mr *MultiRepoTestSetup) CreateTable(dbName, tblName string)

func (*MultiRepoTestSetup) GetDB

func (mr *MultiRepoTestSetup) GetDB(dbName string) *doltdb.DoltDB

func (*MultiRepoTestSetup) GetRemote

func (mr *MultiRepoTestSetup) GetRemote(remoteName string) env.Remote

func (*MultiRepoTestSetup) NewBranch

func (mr *MultiRepoTestSetup) NewBranch(dbName, branchName string)

func (*MultiRepoTestSetup) NewDB

func (mr *MultiRepoTestSetup) NewDB(dbName string)

func (*MultiRepoTestSetup) NewRemote

func (mr *MultiRepoTestSetup) NewRemote(remoteName string)

func (*MultiRepoTestSetup) PushToRemote

func (mr *MultiRepoTestSetup) PushToRemote(dbName, remoteName, branchName string)

func (*MultiRepoTestSetup) StageAll

func (mr *MultiRepoTestSetup) StageAll(dbName string)

type Query

type Query struct {
	Query string
}

func (Query) CommandString

func (q Query) CommandString() string

CommandString describes the Query command for debugging purposes.

func (Query) Exec

func (q Query) Exec(t *testing.T, dEnv *env.DoltEnv) error

Exec executes a Query command on a test dolt environment.

type ResetHard

type ResetHard struct{}

func (ResetHard) CommandString

func (r ResetHard) CommandString() string

CommandString describes the ResetHard command for debugging purposes.

func (ResetHard) Exec

func (r ResetHard) Exec(t *testing.T, dEnv *env.DoltEnv) error

NOTE: does not handle untracked tables

type StageAll

type StageAll struct{}

func (StageAll) CommandString

func (a StageAll) CommandString() string

CommandString describes the StageAll command for debugging purposes.

func (StageAll) Exec

func (a StageAll) Exec(t *testing.T, dEnv *env.DoltEnv) error

Exec executes a StageAll command on a test dolt environment.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL