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 | be61bfe0e918470a3df73834659c8b8a97a5d734 (patch) | |
tree | 857433f3e479dcc2e59bb24b656088246df9c7da /utils/config_test.go | |
parent | 6315af920a8ba696834d163dab3d3be85b680973 (diff) | |
parent | e9040749bdcb1d1bcb7fdd199e27fbe69c1f07ec (diff) | |
download | chat-be61bfe0e918470a3df73834659c8b8a97a5d734.tar.gz chat-be61bfe0e918470a3df73834659c8b8a97a5d734.tar.bz2 chat-be61bfe0e918470a3df73834659c8b8a97a5d734.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() + } +} |