summaryrefslogtreecommitdiffstats
path: root/utils/config_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/config_test.go')
-rw-r--r--utils/config_test.go15
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()
+ }
+}