Skip to content

Commit

Permalink
bool property override with false
Browse files Browse the repository at this point in the history
  • Loading branch information
smgladkovskiy committed Jun 1, 2020
1 parent 217c218 commit 7697e45
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config_examples/configuration/defaults/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ defaults:
format: "json"
host: "127.0.0.1"
port: "8888"
string_value: string
string_test: string
bool_test: true
3 changes: 2 additions & 1 deletion config_examples/configuration/dev/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dev:
debug: true
string_value: null
string_test: null
bool_test: false
4 changes: 3 additions & 1 deletion reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func TestReadConfigs(t *testing.T) {
} `yaml:"log"`
Host string `yaml:"host"`
Port string `yaml:"port"`
StringValue string `yaml:"string_value"`
StringValue string `yaml:"string_test"`
BoolValue bool `yaml:"bool_test"`
}

config := &cfg{}
Expand All @@ -42,6 +43,7 @@ func TestReadConfigs(t *testing.T) {
Host: "127.0.0.1",
Port: "8888",
StringValue: "",
BoolValue: false,
}

assert.EqualValues(t, refConfig, config)
Expand Down

0 comments on commit 7697e45

Please sign in to comment.