summaryrefslogtreecommitdiffstats
path: root/cmd/platform
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2017-11-21 00:53:46 +0100
committerChristopher Speller <crspeller@gmail.com>2017-11-20 15:53:46 -0800
commite2b165cf3ea241dd430cca8145a2dc459110666e (patch)
treeb876f0d2383dcffb773c93c880a691d6e02a48eb /cmd/platform
parentdeff850115392ee46b8d0f14c8019fa49ed5e492 (diff)
downloadchat-e2b165cf3ea241dd430cca8145a2dc459110666e.tar.gz
chat-e2b165cf3ea241dd430cca8145a2dc459110666e.tar.bz2
chat-e2b165cf3ea241dd430cca8145a2dc459110666e.zip
Small fix to run webapp tests (#7777)
Diffstat (limited to 'cmd/platform')
-rw-r--r--cmd/platform/test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/platform/test.go b/cmd/platform/test.go
index c815eebc3..2442d8f43 100644
--- a/cmd/platform/test.go
+++ b/cmd/platform/test.go
@@ -131,7 +131,12 @@ func executeTestCommand(cmd *exec.Cmd) {
}
func runWebClientTests() {
- os.Chdir("webapp")
+ if webappDir := os.Getenv("WEBAPP_DIR"); webappDir != "" {
+ os.Chdir(webappDir)
+ } else {
+ os.Chdir("../mattermost-webapp")
+ }
+
cmd := exec.Command("npm", "test")
executeTestCommand(cmd)
}