mvcc/backend tests: Refactor: Do not mix testing&prod code.
This commit is contained in:
15
server/mvcc/backend/export_test.go
Normal file
15
server/mvcc/backend/export_test.go
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user