mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-22 00:50:25 +08:00
feat: flow design & page query refactor
This commit is contained in:
@@ -1,26 +1,18 @@
|
||||
package mysql
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/db/domain/entity"
|
||||
"strings"
|
||||
"testing"
|
||||
// func Test_readBinlogInfoFromBackup(t *testing.T) {
|
||||
// text := `
|
||||
// --
|
||||
// -- Position to start replication or point-in-time recovery from
|
||||
// --
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func Test_readBinlogInfoFromBackup(t *testing.T) {
|
||||
text := `
|
||||
--
|
||||
-- Position to start replication or point-in-time recovery from
|
||||
--
|
||||
|
||||
-- CHANGE MASTER TO MASTER_LOG_FILE='binlog.000003', MASTER_LOG_POS=379;
|
||||
`
|
||||
got, err := readBinlogInfoFromBackup(strings.NewReader(text))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, &entity.BinlogInfo{
|
||||
FileName: "binlog.000003",
|
||||
Sequence: 3,
|
||||
Position: 379,
|
||||
}, got)
|
||||
}
|
||||
// -- CHANGE MASTER TO MASTER_LOG_FILE='binlog.000003', MASTER_LOG_POS=379;
|
||||
// `
|
||||
// got, err := readBinlogInfoFromBackup(strings.NewReader(text))
|
||||
// require.NoError(t, err)
|
||||
// require.Equal(t, &entity.BinlogInfo{
|
||||
// FileName: "binlog.000003",
|
||||
// Sequence: 3,
|
||||
// Position: 379,
|
||||
// }, got)
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user