testutils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRDBConnStr

func CRDBConnStr() string

func CRDBTargetConnStr added in v0.1.1

func CRDBTargetConnStr() string

func ExecConnQuery added in v0.1.1

func ExecConnQuery(ctx context.Context, q string, conn dbconn.Conn) (res string, err error)

func ExecConnTestdata added in v0.1.1

func ExecConnTestdata(t *testing.T, d *datadriven.TestData, conns dbconn.OrderedConns) string

func GetCmdArgsStr added in v0.1.1

func GetCmdArgsStr(in []datadriven.CmdArg) string

func GetLocalStoreAddrs added in v0.1.1

func GetLocalStoreAddrs(
	dialect string, port string,
) (localStoreListenAddr string, localStoreCrdbAccessAddr string)

func MySQLConnStr

func MySQLConnStr() string

func PGConnStr

func PGConnStr() string

func QueryConnCommand

func QueryConnCommand(t *testing.T, d *datadriven.TestData, conns dbconn.OrderedConns) string

Types

type Dialect added in v0.1.1

type Dialect int
const (
	PostgresDialect Dialect = iota
	MySQLDialect
	CRDBSourceDialect
)

func (*Dialect) String added in v0.1.1

func (i *Dialect) String() string

type FailedWriteToBucketKnob added in v0.1.1

type FailedWriteToBucketKnob struct {
	FailedBeforeReadFromPipe bool
	FailedAfterReadFromPipe  bool
}

type FetchTestingKnobs added in v0.1.1

type FetchTestingKnobs struct {
	// Used to simulate testing when the CSV input file is wrong.
	TriggerCorruptCSVFile bool

	FailedWriteToBucket FailedWriteToBucketKnob

	FailedEstablishSrcConnForExport bool
}

Jump to

Keyboard shortcuts

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