Fixed issue with overriding default config values via command line

This commit is contained in:
Torkel Ödegaard
2015-04-10 10:58:32 +02:00
parent 4c6d7630cd
commit 2020fedfdb
10 changed files with 257 additions and 57 deletions

View File

@ -49,10 +49,13 @@ func TestLoadingSettings(t *testing.T) {
Convey("Should be able to override defaults via command line", func() {
NewConfigContext(&CommandLineArgs{
Args: []string{"cfg:default.paths.data=/tmp/data"},
Args: []string{
"cfg:default.server.domain=test2",
},
Config: filepath.Join(HomePath, "tests/config-files/override.ini"),
})
So(DataPath, ShouldEqual, "/tmp/data")
So(Domain, ShouldEqual, "test2")
})
Convey("Defaults can be overriden in specified config file", func() {