Fix mysql test
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
IamTheFij 2023-08-02 15:55:20 -07:00
parent 4c7baa46a7
commit f3ecabf4fe
2 changed files with 5 additions and 1 deletions

View File

@ -160,6 +160,10 @@ func (t JobTaskMySQL) GetPostTask() ExecutableTask {
command = append(command, "--host", t.Hostname)
}
if t.Port != 0 {
command = append(command, "--port", fmt.Sprintf("%d", t.Port))
}
if t.Username != "" {
command = append(command, "--user", t.Username)
}

View File

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