OSDN Git Service

Removed validate.config. and Modified config.
[bytom/bytom-spv.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.Genesis = "bar"
19         cfg.DBPath = "/opt/data"
20
21         assert.Equal("/foo/bar", cfg.GenesisFile())
22         assert.Equal("/opt/data", cfg.DBDir())
23
24 }