OSDN Git Service

fix the bug (#372)
[bytom/vapor.git] / config / config_test.go
1 package config
2
3 import (
4         "testing"
5
6         "github.com/stretchr/testify/assert"
7 )
8
9 func TestDefaultConfig(t *testing.T) {
10         assert := assert.New(t)
11
12         // set up some defaults
13         cfg := DefaultConfig()
14         assert.NotNil(cfg.P2P)
15
16         // check the root dir stuff...
17         cfg.SetRoot("/foo")
18         cfg.DBPath = "/opt/data"
19
20         assert.Equal("/opt/data", cfg.DBDir())
21
22 }