You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
405 B
Go
16 lines
405 B
Go
2 years ago
|
package binlog
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestGetPreviousGtids(t *testing.T) {
|
||
|
gtid, err := GetPreviousGtids("./test/mysql-bin56.000002")
|
||
|
if nil != err {
|
||
|
t.Fatalf("unexpected error: %v", err)
|
||
|
}
|
||
|
if "7E23401AC60311E38E135E10E6A05CFB:1-5,8186FC1EC5FF11E38DF9E66CCF50DB66:1-11,A6CE328CC60211E38E0DE66CCF50DB66:1-6,B7009920C60111E38E075E10E6A05CFB:1-6" != gtid {
|
||
|
t.Fatalf("wrong gtid %v", gtid)
|
||
|
}
|
||
|
}
|