testutils

package
v2.0.0-beta.3+incompat... Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StoragePut    = "Put"
	StorageGet    = "Get"
	StorageGetAll = "GetAll"
	StorageDelete = "Delete"
)

Method names for MockStorage

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRunner

type MockRunner struct {
	Err error
}

func (*MockRunner) Run

func (m *MockRunner) Run(command *runner.Command) error

type MockStorage

type MockStorage struct {
	mock.Mock
}

MockStorage is a reusable mock of storage.Interface

func (*MockStorage) Delete

func (m *MockStorage) Delete(ctx context.Context, prefix string, key string) error

func (*MockStorage) Get

func (m *MockStorage) Get(ctx context.Context, prefix string, key string) ([]byte, error)

func (*MockStorage) GetAll

func (m *MockStorage) GetAll(ctx context.Context, prefix string) ([][]byte, error)

func (*MockStorage) Put

func (m *MockStorage) Put(ctx context.Context, prefix string, key string, value []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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