Skip to content

Commit e1832b2

Browse files
committed
Fix backup tests
Signed-off-by: Matt Lord <mattalord@gmail.com>
1 parent 8f66a9f commit e1832b2

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

go/test/endtoend/cluster/vtbackup_process.go

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ type VtbackupProcess struct {
3636
MysqlPort int
3737
Directory string
3838

39+
BackupStorageImplementation string
40+
FileBackupStorageRoot string
41+
3942
Cell string
4043
Keyspace string
4144
Shard string
@@ -66,8 +69,8 @@ func (vtbackup *VtbackupProcess) Setup() (err error) {
6669
"--init_shard", vtbackup.Shard,
6770

6871
//Backup Arguments are not optional
69-
"--backup_storage_implementation", "file",
70-
"--file_backup_storage_root", path.Join(os.Getenv("VTDATAROOT"), "tmp", "backupstorage"),
72+
"--backup_storage_implementation", vtbackup.BackupStorageImplementation,
73+
"--file_backup_storage_root", vtbackup.FileBackupStorageRoot,
7174
)
7275

7376
if vtbackup.initialBackup {
@@ -129,16 +132,18 @@ func VtbackupProcessInstance(tabletUID int, mysqlPort int, newInitDBFile string,
129132
cell string, hostname string, tmpDirectory string, topoPort int, initialBackup bool) *VtbackupProcess {
130133
base := VtProcessInstance("vtbackup", "vtbackup", topoPort, hostname)
131134
vtbackup := &VtbackupProcess{
132-
VtProcess: *base,
133-
LogDir: tmpDirectory,
134-
Directory: os.Getenv("VTDATAROOT"),
135-
TabletAlias: fmt.Sprintf("%s-%010d", cell, tabletUID),
136-
initDBfile: newInitDBFile,
137-
Keyspace: keyspace,
138-
Shard: shard,
139-
Cell: cell,
140-
MysqlPort: mysqlPort,
141-
initialBackup: initialBackup,
135+
VtProcess: *base,
136+
LogDir: tmpDirectory,
137+
Directory: os.Getenv("VTDATAROOT"),
138+
BackupStorageImplementation: "file",
139+
FileBackupStorageRoot: path.Join(os.Getenv("VTDATAROOT"), "/backups"),
140+
TabletAlias: fmt.Sprintf("%s-%010d", cell, tabletUID),
141+
initDBfile: newInitDBFile,
142+
Keyspace: keyspace,
143+
Shard: shard,
144+
Cell: cell,
145+
MysqlPort: mysqlPort,
146+
initialBackup: initialBackup,
142147
}
143148
return vtbackup
144149
}

0 commit comments

Comments
 (0)