Skip to content

Commit

Permalink
unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Sep 1, 2023
1 parent 777e574 commit a899393
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion memiavl/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,14 @@ func TestLoadVersion(t *testing.T) {
}
t.Run(strconv.Itoa(i), func(t *testing.T) {
require.NoError(t, db.ApplyChangeSets(cs))
_, _, err := db.Commit()

// check the working hash
workingHash := db.WorkingHash()
require.Equal(t, RefHashes[db.Version()], db.WorkingCommitInfo().StoreInfos[0].CommitId.Hash)

h, _, err := db.Commit()
require.NoError(t, err)
require.Equal(t, workingHash, h)
})
}
require.NoError(t, db.Close())
Expand Down

0 comments on commit a899393

Please sign in to comment.