@@ -25,6 +25,7 @@ import (
25
25
"strings"
26
26
"syscall"
27
27
"time"
28
+ vtutils "vitess.io/vitess/go/vt/utils"
28
29
29
30
"vitess.io/vitess/go/vt/log"
30
31
)
@@ -49,6 +50,10 @@ type VtctldProcess struct {
49
50
50
51
// Setup starts vtctld process with required arguements
51
52
func (vtctld * VtctldProcess ) Setup (cell string , extraArgs ... string ) (err error ) {
53
+ vtctldVer , err := GetMajorVersion (vtctld .Binary )
54
+ if err != nil {
55
+ return err
56
+ }
52
57
_ = createDirectory (vtctld .LogDir , 0700 )
53
58
_ = createDirectory (path .Join (vtctld .Directory , "backups" ), 0700 )
54
59
vtctld .proc = exec .Command (
@@ -60,7 +65,7 @@ func (vtctld *VtctldProcess) Setup(cell string, extraArgs ...string) (err error)
60
65
"--cell" , cell ,
61
66
"--service_map" , vtctld .ServiceMap ,
62
67
"--backup_storage_implementation" , vtctld .BackupStorageImplementation ,
63
- "--file-backup-storage-root" , vtctld .FileBackupStorageRoot ,
68
+ vtutils . GetFlagVariantForTestsByVersion ( "--file-backup-storage-root" , vtctldVer ) , vtctld .FileBackupStorageRoot ,
64
69
"--log_dir" , vtctld .LogDir ,
65
70
"--port" , fmt .Sprintf ("%d" , vtctld .Port ),
66
71
"--grpc_port" , fmt .Sprintf ("%d" , vtctld .GrpcPort ),
0 commit comments