Fix mysql test
This commit is contained in:
parent
4c7baa46a7
commit
f3ecabf4fe
4
tasks.go
4
tasks.go
@ -160,6 +160,10 @@ func (t JobTaskMySQL) GetPostTask() ExecutableTask {
|
|||||||
command = append(command, "--host", t.Hostname)
|
command = append(command, "--host", t.Hostname)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if t.Port != 0 {
|
||||||
|
command = append(command, "--port", fmt.Sprintf("%d", t.Port))
|
||||||
|
}
|
||||||
|
|
||||||
if t.Username != "" {
|
if t.Username != "" {
|
||||||
command = append(command, "--user", t.Username)
|
command = append(command, "--user", t.Username)
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ func TestJobTaskSql(t *testing.T) {
|
|||||||
" --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 db < ./simple.sql",
|
postRestore: "mysql --host host --port 3306 --user user --password=pass db < ./simple.sql",
|
||||||
},
|
},
|
||||||
// Sqlite
|
// Sqlite
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user