diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-06-16 17:05:23 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-06-16 17:05:23 -0400 |
commit | bc8d9ac59949e3b1152e5876e1c67800ef15e299 (patch) | |
tree | 2e6199ba61c924791179df48d57abf57d192a6ce /utils/config_test.go | |
parent | c556bf3fbae5fab2ce91809aa9956683154a24bb (diff) | |
download | chat-bc8d9ac59949e3b1152e5876e1c67800ef15e299.tar.gz chat-bc8d9ac59949e3b1152e5876e1c67800ef15e299.tar.bz2 chat-bc8d9ac59949e3b1152e5876e1c67800ef15e299.zip |
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() + } +} |