Skip to content

Commit

Permalink
Fix backup tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Jan 3, 2025
1 parent 8f66a9f commit b2b65c8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions go/test/endtoend/backup/vtctlbackup/backup_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,7 @@ func getDefaultCommonArgs() []string {
"--watch_replication_stream",
"--enable_replication_reporter",
"--serving_state_grace_period", "1s",
"--file_backup_storage_root", cluster.FileBackupStorageRoot,
}
}

Expand Down
4 changes: 3 additions & 1 deletion go/test/endtoend/cluster/vtbackup_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import (
"vitess.io/vitess/go/vt/log"
)

var FileBackupStorageRoot string = path.Join(os.Getenv("VTDATAROOT"), "backups")

// VtbackupProcess is a generic handle for a running Vtbackup.
// It can be spawned manually
type VtbackupProcess struct {
Expand Down Expand Up @@ -67,7 +69,7 @@ func (vtbackup *VtbackupProcess) Setup() (err error) {

//Backup Arguments are not optional
"--backup_storage_implementation", "file",
"--file_backup_storage_root", path.Join(os.Getenv("VTDATAROOT"), "tmp", "backupstorage"),
"--file_backup_storage_root", FileBackupStorageRoot,
)

if vtbackup.initialBackup {
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/cluster/vtctld_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func VtctldProcessInstance(httpPort int, grpcPort int, topoPort int, hostname st
VtProcess: *base,
ServiceMap: "grpc-vtctl,grpc-vtctld",
BackupStorageImplementation: "file",
FileBackupStorageRoot: path.Join(os.Getenv("VTDATAROOT"), "/backups"),
FileBackupStorageRoot: FileBackupStorageRoot,
LogDir: tmpDirectory,
Port: httpPort,
GrpcPort: grpcPort,
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/cluster/vtorc_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (orc *VTOrcProcess) Setup() (err error) {
--config config/vtorc/default.json --alsologtostderr
*/
orc.proc = exec.Command(
"vtorc",
orc.Binary,
"--topo_implementation", orc.TopoImplementation,
"--topo_global_server_address", orc.TopoGlobalAddress,
"--topo_global_root", orc.TopoGlobalRoot,
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/cluster/vttablet_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ func VttabletProcessInstance(port, grpcPort, tabletUID int, cell, shard, keyspac
SupportsBackup: true,
ServingStatus: "NOT_SERVING",
BackupStorageImplementation: "file",
FileBackupStorageRoot: path.Join(os.Getenv("VTDATAROOT"), "/backups"),
FileBackupStorageRoot: FileBackupStorageRoot,
TabletUID: tabletUID,
Charset: charset,
}
Expand Down
4 changes: 3 additions & 1 deletion go/test/endtoend/recovery/unshardedrecovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ var (
"--degraded_threshold", "5s",
"--lock_tables_timeout", "5s",
"--watch_replication_stream",
"--serving_state_grace_period", "1s"}
"--serving_state_grace_period", "1s",
"--file_backup_storage_root", cluster.FileBackupStorageRoot,
}
recoveryKS1 = "recovery_ks1"
recoveryKS2 = "recovery_ks2"
vtInsertTest = `create table vt_insert_test (
Expand Down

0 comments on commit b2b65c8

Please sign in to comment.