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.
26 lines
495 B
Go
26 lines
495 B
Go
package binlog
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestNextBinlogPath(t *testing.T) {
|
|
a, err := NextBinlogPath("/opt/mysql-relay-log.000199")
|
|
if nil != err {
|
|
t.Errorf("got err %v", err)
|
|
}
|
|
if "/opt/mysql-relay-log.000200" != a {
|
|
t.Errorf("got wrong return %v", a)
|
|
}
|
|
}
|
|
|
|
func TestNextBinlogName(t *testing.T) {
|
|
a, err := NextBinlogName("/opt/mysql-relay-log.000199")
|
|
if nil != err {
|
|
t.Errorf("got err %v", err)
|
|
}
|
|
if "mysql-relay-log.000200" != a {
|
|
t.Errorf("got wrong return %v", a)
|
|
}
|
|
}
|