mustGetBucketRootPage returns the root page for the provided bucket.
(t testing.TB, db *bbolt.DB, bucketName []byte)
| 203 | |
| 204 | // mustGetBucketRootPage returns the root page for the provided bucket. |
| 205 | func mustGetBucketRootPage(t testing.TB, db *bbolt.DB, bucketName []byte) common.Pgid { |
| 206 | var rootPageId common.Pgid |
| 207 | _ = db.View(func(tx *bbolt.Tx) error { |
| 208 | b := tx.Bucket(bucketName) |
| 209 | require.NotNil(t, b) |
| 210 | rootPageId = b.RootPage() |
| 211 | return nil |
| 212 | }) |
| 213 | |
| 214 | return rootPageId |
| 215 | } |
no test coverage detected