wp
This commit is contained in:
18
recovery/recovery_test.go
Normal file
18
recovery/recovery_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package recovery
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFindMaxVersion(t *testing.T) {
|
||||
result, err := findFileLatestVersion(".", "wal_")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if result.Name != "test.wal_123" {
|
||||
t.Fatalf("wrong file name %s instead of test.wal_123", result.Name)
|
||||
}
|
||||
if result.Version != 123 {
|
||||
t.Fatalf("wrong file version %d instead of 123", result.Version)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user