Documentation ¶
Index ¶
- Constants
- Variables
- func ExecTestIncrementalBackupAndRestoreToPos(t *testing.T, tcase *PITRTestCase)
- func ExecTestIncrementalBackupAndRestoreToTimestamp(t *testing.T, tcase *PITRTestCase)
- func ExecTestIncrementalBackupOnTwoTablets(t *testing.T, tcase *PITRTestCase)
- func FlushAndPurgeBinaryLogsOnReplica(t *testing.T, replicaIndex int) (lastBinlog string)
- func FlushBinaryLogsOnReplica(t *testing.T, replicaIndex int, count int)
- func GetReplicaGtidPurged(t *testing.T, replicaIndex int) string
- func GetReplicaPosition(t *testing.T, replicaIndex int) string
- func InitTestTable(t *testing.T)
- func InsertRowOnPrimary(t *testing.T, hint string)
- func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *CompressionDetails) (int, error)
- func ReadRowsFromPrimary(t *testing.T) (msgs []string)
- func ReadRowsFromReplica(t *testing.T, replicaIndex int) (msgs []string)
- func ReadRowsFromTablet(t *testing.T, tablet *cluster.Vttablet) (msgs []string)
- func RemoveBackup(t *testing.T, backupName string)
- func TearDownCluster()
- func TestBackup(t *testing.T, setupType int, streamMode string, stripes int, ...) error
- func TestReplicaFullBackup(t *testing.T, replicaIndex int) (manifest *mysqlctl.BackupManifest)
- func TestReplicaFullRestore(t *testing.T, replicaIndex int, expectError string)
- func TestReplicaIncrementalBackup(t *testing.T, replicaIndex int, incrementalFromPos string, expectEmpty bool, ...) (manifest *mysqlctl.BackupManifest, backupName string)
- func TestReplicaRestoreToPos(t *testing.T, replicaIndex int, restoreToPos replication.Position, ...)
- func TestReplicaRestoreToTimestamp(t *testing.T, restoreToTimestamp time.Time, expectError string)
- type CompressionDetails
- type PITRTestCase
Constants ¶
const ( XtraBackup = iota BuiltinBackup Mysqlctld )
constants for test variants
Variables ¶
var (
SetupReplica3Tablet func(extraArgs []string) (*cluster.Vttablet, error)
)
Functions ¶
func ExecTestIncrementalBackupAndRestoreToPos ¶
func ExecTestIncrementalBackupAndRestoreToPos(t *testing.T, tcase *PITRTestCase)
ExecTestIncrementalBackupAndRestoreToPos runs a series of backups: a full backup and multiple incremental backups. in between, it makes writes to the database, and takes notes: what data was available in what backup. It then restores each and every one of those backups, in random order, and expects to find the specific data associated with the backup.
func ExecTestIncrementalBackupAndRestoreToTimestamp ¶
func ExecTestIncrementalBackupAndRestoreToTimestamp(t *testing.T, tcase *PITRTestCase)
ExecTestIncrementalBackupAndRestoreToPos
func ExecTestIncrementalBackupOnTwoTablets ¶
func ExecTestIncrementalBackupOnTwoTablets(t *testing.T, tcase *PITRTestCase)
ExecTestIncrementalBackupOnTwoTablets runs a series of interleaved backups on two different replicas: full and incremental. Specifically, it's designed to test how incremental backups are taken by interleaved replicas, so that they successfully build on one another.
func FlushAndPurgeBinaryLogsOnReplica ¶
FlushAndPurgeBinaryLogsOnReplica intentionally loses all existing binary logs. It flushes into a new binary log and immediately purges all previous logs. This is used to lose information.
func FlushBinaryLogsOnReplica ¶
FlushBinaryLogsOnReplica issues `FLUSH BINARY LOGS` <count> times
func InitTestTable ¶
func InsertRowOnPrimary ¶
func LaunchCluster ¶
func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *CompressionDetails) (int, error)
LaunchCluster : starts the cluster as per given params.
func ReadRowsFromPrimary ¶
func ReadRowsFromTablet ¶
func RemoveBackup ¶
func TestBackup ¶
func TestBackup(t *testing.T, setupType int, streamMode string, stripes int, cDetails *CompressionDetails, runSpecific []string) error
TestBackup runs all the backup tests
func TestReplicaFullBackup ¶
func TestReplicaFullBackup(t *testing.T, replicaIndex int) (manifest *mysqlctl.BackupManifest)
func TestReplicaFullRestore ¶
func TestReplicaRestoreToPos ¶
Types ¶
type CompressionDetails ¶
type PITRTestCase ¶
type PITRTestCase struct { Name string SetupType int ComprssDetails *CompressionDetails }