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 | 2f2aded178c161f7688f295231605711806c7f64 (patch) | |
tree | 478036664138f16a4d72cc416320ed5a9630fd38 /utils/config_test.go | |
parent | dae0340d7de308d2e6bc7145fb158635b5cdf0ca (diff) | |
download | chat-2f2aded178c161f7688f295231605711806c7f64.tar.gz chat-2f2aded178c161f7688f295231605711806c7f64.tar.bz2 chat-2f2aded178c161f7688f295231605711806c7f64.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() + } +} |