tests

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigratorSuite

type MigratorSuite struct {
	ApplyTmpl    string
	RevertTmpl   string
	CleanMigTmpl string
	CleanTest    string
	// contains filtered or unexported fields
}

func NewMigratorSuite

func NewMigratorSuite(m dbump.Migrator) *MigratorSuite

func (*MigratorSuite) ApplyAll

func (suite *MigratorSuite) ApplyAll(t *testing.T)

func (*MigratorSuite) ApplyAllWhenFull

func (suite *MigratorSuite) ApplyAllWhenFull(t *testing.T)

func (*MigratorSuite) ApplyOne

func (suite *MigratorSuite) ApplyOne(t *testing.T)

func (*MigratorSuite) Drop

func (suite *MigratorSuite) Drop(t *testing.T)

func (*MigratorSuite) Redo

func (suite *MigratorSuite) Redo(t *testing.T)

func (*MigratorSuite) RevertAll

func (suite *MigratorSuite) RevertAll(t *testing.T)

func (*MigratorSuite) RevertAllWhenEmpty

func (suite *MigratorSuite) RevertAllWhenEmpty(t *testing.T)

func (*MigratorSuite) RevertOne

func (suite *MigratorSuite) RevertOne(t *testing.T)

type MockMigrator

type MockMigrator struct {
	LockDBFn   func(ctx context.Context) error
	UnlockDBFn func(ctx context.Context) error
	InitFn     func(ctx context.Context) error
	DropFn     func(ctx context.Context) error
	VersionFn  func(ctx context.Context) (version int, err error)
	DoStepFn   func(ctx context.Context, step dbump.Step) error
	// contains filtered or unexported fields
}

func NewMockMigrator

func NewMockMigrator(m dbump.Migrator) *MockMigrator

func (*MockMigrator) DoStep

func (mm *MockMigrator) DoStep(ctx context.Context, step dbump.Step) error

func (*MockMigrator) Drop

func (mm *MockMigrator) Drop(ctx context.Context) error

func (*MockMigrator) Init

func (mm *MockMigrator) Init(ctx context.Context) error

func (*MockMigrator) LockDB

func (mm *MockMigrator) LockDB(ctx context.Context) error

func (*MockMigrator) Log

func (mm *MockMigrator) Log() []string

func (*MockMigrator) LogAdd

func (mm *MockMigrator) LogAdd(s ...string)

func (*MockMigrator) UnlockDB

func (mm *MockMigrator) UnlockDB(ctx context.Context) error

func (*MockMigrator) Version

func (mm *MockMigrator) Version(ctx context.Context) (version int, err error)

Jump to

Keyboard shortcuts

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