testbackend

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IMPL_ENV      = "TEST_BACKEND_IMPL"
	TRACE_DIR_ENV = "TEST_BACKEND_TRACE_DIR"
	NAME          = "test"
	BIN           = "dist/standard-backups-test-backend"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseImpl

type BaseImpl struct {
	Enable bool
	Error  string
}

type Impl

type Impl struct {
	Backup      BaseImpl
	Exec        BaseImpl
	ListBackups ListBackupsImpl
	Restore     BaseImpl
}

type ListBackupsImpl

type ListBackupsImpl struct {
	BaseImpl
	Res *proto.ListBackupsResponse
}

type TestBackend

type TestBackend struct {
	// contains filtered or unexported fields
}

func New

func New(t *testing.T, impl Impl) *TestBackend

New creates a new interface for controlling the test backend

func (*TestBackend) AddSelf

func (b *TestBackend) AddSelf(tc *testutils.TestConfig)

func (*TestBackend) Apply

func (b *TestBackend) Apply(cmd *exec.Cmd)

func (*TestBackend) RequireTrace

func (b *TestBackend) RequireTrace(command string) []byte

Jump to

Keyboard shortcuts

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