test: fix 'loadMetaPage' always read the first meta page

Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
Benjamin Wang 2023-05-26 15:00:45 +08:00
parent 3fd1022a0a
commit d19b7c8fba

View File

@ -11,7 +11,7 @@ import (
) )
func loadMetaPage(t *testing.T, dbPath string, pageID uint64) *common.Meta { func loadMetaPage(t *testing.T, dbPath string, pageID uint64) *common.Meta {
_, buf, err := guts_cli.ReadPage(dbPath, 0) _, buf, err := guts_cli.ReadPage(dbPath, pageID)
require.NoError(t, err) require.NoError(t, err)
return common.LoadPageMeta(buf) return common.LoadPageMeta(buf)
} }