mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
29 lines
711 B
Go
29 lines
711 B
Go
|
package channeldb_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/lightningnetwork/lnd/channeldb"
|
||
|
"github.com/lightningnetwork/lnd/channeldb/kvdb"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
// TestDefaultOptions tests the default options are created as intended.
|
||
|
func TestDefaultOptions(t *testing.T) {
|
||
|
|
||
|
opts := channeldb.DefaultOptions()
|
||
|
|
||
|
require.True(t, opts.NoFreelistSync)
|
||
|
require.False(t, opts.AutoCompact)
|
||
|
require.Equal(
|
||
|
t, kvdb.DefaultBoltAutoCompactMinAge, opts.AutoCompactMinAge,
|
||
|
)
|
||
|
require.Equal(t, kvdb.DefaultDBTimeout, opts.DBTimeout)
|
||
|
require.Equal(
|
||
|
t, channeldb.DefaultRejectCacheSize, opts.RejectCacheSize,
|
||
|
)
|
||
|
require.Equal(
|
||
|
t, channeldb.DefaultChannelCacheSize, opts.ChannelCacheSize,
|
||
|
)
|
||
|
}
|