This commit is contained in:
2026-06-13 22:43:17 +00:00
parent 1d1fdb1f0b
commit 685c48f94f
28 changed files with 2492 additions and 2657 deletions

18
recovery/recovery_test.go Normal file
View 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)
}
}