testutil

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeFormat = "Jan 2 15:04:05 2006 -0700"

	DBContainerTimeoutSeconds = 60 * 30 // 30 minutes

)

Variables

This section is empty.

Functions

func GetDB

func GetDB(t testing.TB, uri string, opts ...GetDBOption) (db.Database, string)

func GetDBInstance

func GetDBInstance(pool *dockertest.Pool) (string, func())

func Must

func Must(t testing.TB, err error)

func MustDo

func MustDo(t testing.TB, what string, err error)

func NewBlockAdapterByEnv

func NewBlockAdapterByEnv(t *testing.T, translator block.UploadIDTranslator) block.Adapter

func SetupTestingEnv added in v0.13.0

func SetupTestingEnv(name, storageNS string) (logging.Logger, *genclient.Lakefs, *s3.S3)

Types

type GetDBOption

type GetDBOption func(options *GetDBOptions)

func WithGetDBApplyDDL

func WithGetDBApplyDDL(apply bool) GetDBOption

type GetDBOptions

type GetDBOptions struct {
	ApplyDDL bool
}

type UploadIDTranslator

type UploadIDTranslator struct {
	T          *testing.T
	TransMap   map[string]string
	ExpectedID string
	// contains filtered or unexported fields
}

func (*UploadIDTranslator) RemoveUploadID

func (d *UploadIDTranslator) RemoveUploadID(inputUploadID string)

func (*UploadIDTranslator) SetUploadID

func (d *UploadIDTranslator) SetUploadID(uploadID string) string

func (*UploadIDTranslator) TranslateUploadID

func (d *UploadIDTranslator) TranslateUploadID(simulationID string) string

Jump to

Keyboard shortcuts

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