Documentation ¶
Index ¶
- func CheckCancelAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
- func CheckCancelMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckMigrationArtifacts(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckRetryMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CreateTempScript(t *testing.T, content string) (fileName string)
- func MysqlClientExecFile(t *testing.T, mysqlParams *mysql.ConnParams, testDataPath, testName string, ...) (output string)
- func PrintQueryResult(writer io.Writer, qr *sqltypes.Result)
- func ReadMigrationLogs(t *testing.T, vtParams *mysql.ConnParams, uuid string) (logs []string)
- func ReadMigrations(t *testing.T, vtParams *mysql.ConnParams, like string) *sqltypes.Result
- func VtgateExecDDL(t *testing.T, vtParams *mysql.ConnParams, ddlStrategy string, query string, ...) *sqltypes.Result
- func VtgateExecQuery(t *testing.T, vtParams *mysql.ConnParams, query string, expectError string) *sqltypes.Result
- func WaitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...) schema.OnlineDDLStatus
- func WaitForVReplicationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...) (status string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCancelAllMigrations ¶
func CheckCancelAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
CheckCancelAllMigrations cancels all pending migrations and expect number of affected rows
func CheckCancelMigration ¶
func CheckCancelMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectCancelPossible bool)
CheckCancelMigration attempts to cancel a migration, and expects success/failure by counting affected rows
func CheckMigrationArtifacts ¶
func CheckMigrationArtifacts(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectArtifacts bool)
CheckMigrationArtifacts verifies given migration exists, and checks if it has artifacts
func CheckMigrationStatus ¶
func CheckMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectStatuses ...schema.OnlineDDLStatus)
CheckMigrationStatus verifies that the migration indicated by given UUID has the given expected status
func CheckRetryMigration ¶
func CheckRetryMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectRetryPossible bool)
CheckRetryMigration attempts to retry a migration, and expects success/failure by counting affected rows
func CreateTempScript ¶ added in v0.11.0
CreateTempScript creates a script in the temporary directory with given content
func MysqlClientExecFile ¶ added in v0.11.0
func MysqlClientExecFile(t *testing.T, mysqlParams *mysql.ConnParams, testDataPath, testName string, fileName string) (output string)
MysqlClientExecFile runs a file through the mysql client
func PrintQueryResult ¶
PrintQueryResult will pretty-print a QueryResult to the logger.
func ReadMigrationLogs ¶ added in v0.11.0
ReadMigrationLogs reads migration logs for a given migration, on all shards
func ReadMigrations ¶ added in v0.11.0
ReadMigrations reads migration entries
func VtgateExecDDL ¶
func VtgateExecDDL(t *testing.T, vtParams *mysql.ConnParams, ddlStrategy string, query string, expectError string) *sqltypes.Result
VtgateExecDDL executes a DDL query with given strategy
func VtgateExecQuery ¶
func VtgateExecQuery(t *testing.T, vtParams *mysql.ConnParams, query string, expectError string) *sqltypes.Result
VtgateExecQuery runs a query on VTGate using given query params
func WaitForMigrationStatus ¶ added in v0.11.0
func WaitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, timeout time.Duration, expectStatuses ...schema.OnlineDDLStatus) schema.OnlineDDLStatus
WaitForMigrationStatus waits for a migration to reach either provided statuses (returns immediately), or eventually time out
func WaitForVReplicationStatus ¶ added in v0.12.0
func WaitForVReplicationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, timeout time.Duration, expectStatuses ...string) (status string)
WaitForVReplicationStatus waits for a vreplication stream to be in one of given states, or timeout
Types ¶
This section is empty.