test: perform check in view(readonly) mode

Signed-off-by: Benjamin Wang <wachao@vmware.com>
pull/431/head
Benjamin Wang 2023-03-20 11:00:38 +08:00
parent 0c2c0a257a
commit b91d901b74
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ func (db *DB) MustReopen() {
// MustCheck runs a consistency check on the database and panics if any errors are found.
func (db *DB) MustCheck() {
err := db.Update(func(tx *bolt.Tx) error {
err := db.View(func(tx *bolt.Tx) error {
// Collect all the errors.
var errors []error
for err := range tx.Check() {