2014-06-17 12:53:24 +04:00
|
|
|
package reaper
|
2014-06-17 20:46:12 +04:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2016-02-18 12:08:51 +03:00
|
|
|
"github.com/admpub/boltstore/shared"
|
2014-06-17 20:46:12 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestOptions_setDefault(t *testing.T) {
|
|
|
|
options := Options{}
|
|
|
|
options.setDefault()
|
|
|
|
if string(options.BucketName) != shared.DefaultBucketName {
|
|
|
|
t.Errorf("options.BucketName should be %+v (actual: %+v)", []byte(shared.DefaultBucketName), options.BucketName)
|
|
|
|
}
|
|
|
|
if options.BatchSize != shared.DefaultBatchSize {
|
|
|
|
t.Errorf("options.BucketName should be %+d (actual: %+d)", shared.DefaultBatchSize, options.BatchSize)
|
|
|
|
}
|
|
|
|
if options.CheckInterval != shared.DefaultCheckInterval {
|
|
|
|
t.Errorf("options.BucketName should be %+v (actual: %+v)", shared.DefaultCheckInterval, options.CheckInterval)
|
|
|
|
}
|
|
|
|
}
|