diff options
author | Corey Hulen <corey@hulen.com> | 2015-06-16 13:50:22 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-06-16 13:50:22 -0800 |
commit | 521cb015c43010231d7de5895b5a41ef8fb6991f (patch) | |
tree | 557475011f8776bc65ece75d065cf8c4924ac56f /utils/config_test.go | |
parent | f937fa0d9cc5fb8e63c95b53ceea8665c35a8125 (diff) | |
parent | 2f2aded178c161f7688f295231605711806c7f64 (diff) | |
download | chat-521cb015c43010231d7de5895b5a41ef8fb6991f.tar.gz chat-521cb015c43010231d7de5895b5a41ef8fb6991f.tar.bz2 chat-521cb015c43010231d7de5895b5a41ef8fb6991f.zip |
Merge pull request #15 from mattermost/enviroment-override
Allow for setting of domain with enviroment variable
Diffstat (limited to 'utils/config_test.go')
-rw-r--r-- | utils/config_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/config_test.go b/utils/config_test.go index 4d37b4e88..9067dc647 100644 --- a/utils/config_test.go +++ b/utils/config_test.go @@ -4,9 +4,24 @@ package utils import ( + "os" "testing" ) func TestConfig(t *testing.T) { LoadConfig("config.json") } + +func TestEnvOverride(t *testing.T) { + os.Setenv("MATTERMOST_DOMAIN", "testdomain.com") + + LoadConfig("config_docker.json") + if Cfg.ServiceSettings.Domain != "testdomain.com" { + t.Fail() + } + + LoadConfig("config.json") + if Cfg.ServiceSettings.Domain == "testdomain.com" { + t.Fail() + } +} |