testutils

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAccount

func CreateAccount(
	t *testing.T,
	c embed.Cluster,
	accountName string,
	password string,
) int32

func CreateTableAndWaitCNApplied

func CreateTableAndWaitCNApplied(
	t *testing.T,
	db string,
	tableName string,
	tableSQL string,
	createOnCN embed.ServiceOperator,
	waitOnCNs ...embed.ServiceOperator,
) timestamp.Timestamp

func CreateTestDatabase

func CreateTestDatabase(
	t *testing.T,
	name string,
	cn embed.ServiceOperator,
)

func CreateTestDatabaseWithAccount

func CreateTestDatabaseWithAccount(
	t *testing.T,
	account int32,
	name string,
	cn embed.ServiceOperator,
)

func DBExists

func DBExists(
	t *testing.T,
	name string,
	cn embed.ServiceOperator,
) bool

func DBExistsWithAccount

func DBExistsWithAccount(
	t *testing.T,
	account int32,
	name string,
	cn embed.ServiceOperator,
) bool

func ExecSQL

func ExecSQL(
	t *testing.T,
	db string,
	cn embed.ServiceOperator,
	sql ...string,
) timestamp.Timestamp

func ExecSQLWithAccount

func ExecSQLWithAccount(
	t *testing.T,
	account int32,
	db string,
	cn embed.ServiceOperator,
	sql ...string,
) timestamp.Timestamp

func ExecSQLWithMinCommittedTS

func ExecSQLWithMinCommittedTS(
	t *testing.T,
	db string,
	cn embed.ServiceOperator,
	min timestamp.Timestamp,
	sql ...string,
) timestamp.Timestamp

func ExecSQLWithMinCommittedTSAndAccount

func ExecSQLWithMinCommittedTSAndAccount(
	t *testing.T,
	account int32,
	db string,
	cn embed.ServiceOperator,
	min timestamp.Timestamp,
	sql ...string,
) timestamp.Timestamp

func ExecSQLWithReadResult

func ExecSQLWithReadResult(
	t *testing.T,
	db string,
	cn embed.ServiceOperator,
	reader func(int, string, executor.Result),
	sql ...string,
) timestamp.Timestamp

func ExecSQLWithReadResultAndAccount

func ExecSQLWithReadResultAndAccount(
	t *testing.T,
	account int32,
	db string,
	cn embed.ServiceOperator,
	reader func(int, string, executor.Result),
	sql ...string,
) timestamp.Timestamp

func GetDatabaseName

func GetDatabaseName(
	t *testing.T,
) string

func GetSQLExecutor

func GetSQLExecutor(
	cn embed.ServiceOperator,
) executor.SQLExecutor

func GetTableID

func GetTableID(
	t *testing.T,
	db string,
	table string,
	txn executor.TxnExecutor,
) uint64

func HasName

func HasName(
	name string,
	res executor.Result,
) bool

func MustParseMOCtlResult

func MustParseMOCtlResult(t *testing.T, result string) string

func ReadCount

func ReadCount(
	res executor.Result,
) int

func TableExists

func TableExists(
	t *testing.T,
	db string,
	name string,
	cn embed.ServiceOperator,
) bool

func TableExistsWithAccount

func TableExistsWithAccount(
	t *testing.T,
	account int32,
	db string,
	name string,
	cn embed.ServiceOperator,
) bool

func WaitClusterAppliedTo

func WaitClusterAppliedTo(
	t *testing.T,
	c embed.Cluster,
	ts timestamp.Timestamp,
)

func WaitDatabaseCreated

func WaitDatabaseCreated(
	t *testing.T,
	name string,
	cn embed.ServiceOperator,
)

func WaitDatabaseCreatedWithAccount

func WaitDatabaseCreatedWithAccount(
	t *testing.T,
	account int32,
	name string,
	cn embed.ServiceOperator,
)

func WaitLogtailApplied

func WaitLogtailApplied(
	t *testing.T,
	min timestamp.Timestamp,
	cn embed.ServiceOperator,
)

func WaitTableCreated

func WaitTableCreated(
	t *testing.T,
	db string,
	name string,
	cn embed.ServiceOperator,
)

func WaitTableCreatedWithAccount

func WaitTableCreatedWithAccount(
	t *testing.T,
	account int32,
	db string,
	name string,
	cn embed.ServiceOperator,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

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