mvcc/backend tests: Refactor: Do not mix testing&prod code.

This commit is contained in:
Piotr Tabor
2021-04-09 15:49:50 +02:00
parent ea287dd9f8
commit d7d110b5a8
20 changed files with 257 additions and 196 deletions

View File

@ -0,0 +1,15 @@
package backend
import bolt "go.etcd.io/bbolt"
func DbFromBackendForTest(b Backend) *bolt.DB {
return b.(*backend).db
}
func DefragLimitForTest() int {
return defragLimit
}
func CommitsForTest(b Backend) int64 {
return b.(*backend).Commits()
}