File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ type Type struct {
95
95
JSONRPCPort int64 `yaml:"JsonRpcPort" default:"36791"`
96
96
MicroService MicroService `yaml:"MicroService"`
97
97
HTTPMicroService HTTPMicroService `yaml:"HttpMicroService"`
98
- UpdateBranchSync int64 `yaml:"UpdateBranchSync"`
98
+ UpdateBranchSync int64 `yaml:"UpdateBranchSync" default:"1" `
99
99
UpdateBranchAsyncGoroutineNum int64 `yaml:"UpdateBranchAsyncGoroutineNum" default:"1"`
100
100
LogLevel string `yaml:"LogLevel" default:"info"`
101
101
Log Log `yaml:"Log"`
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ func TestLoadFromEnv(t *testing.T) {
19
19
20
20
func TestLoadConfig (t * testing.T ) {
21
21
MustLoadConfig ("../../conf.sample.yml" )
22
+
23
+ //assert default value
24
+ assert .Equal (t , int64 (1 ), Config .UpdateBranchSync )
22
25
}
23
26
func TestCheckConfig (t * testing.T ) {
24
27
conf := Config
You can’t perform that action at this time.
0 commit comments