mysqldump password requires = on argument
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
IamTheFij 2022-04-15 10:52:26 -07:00
parent cc3b630359
commit 66a7881259
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ func (t JobTaskMySQL) GetPreTask() ExecutableTask {
} }
if t.Password != "" { if t.Password != "" {
command = append(command, "--password", t.Password) command = append(command, fmt.Sprintf("--password=%s", t.Password))
} }
if t.NoTablespaces { if t.NoTablespaces {

View File

@ -160,7 +160,7 @@ func TestJobTaskSql(t *testing.T) {
}, },
validationErr: nil, validationErr: nil,
preBackup: "mysqldump --result-file ./simple.sql --host host --port 3306" + preBackup: "mysqldump --result-file ./simple.sql --host host --port 3306" +
" --user user --password pass --no-tablespaces db table1 table2", " --user user --password=pass --no-tablespaces db table1 table2",
postBackup: "", postBackup: "",
preRestore: "", preRestore: "",
postRestore: "mysql --host host --user user --password pass < ./simple.sql", postRestore: "mysql --host host --user user --password pass < ./simple.sql",