diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-16 08:09:43 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-10-16 11:09:43 -0400 |
commit | 34285d8cca93fc0f473636e78680fade03f26bda (patch) | |
tree | b8274ed8d17e5dc63ac36aadac7e7299635d2b43 /api4/command_test.go | |
parent | adb2b1d6eddabea803af8fa6cf53a75c98694427 (diff) | |
download | chat-34285d8cca93fc0f473636e78680fade03f26bda.tar.gz chat-34285d8cca93fc0f473636e78680fade03f26bda.tar.bz2 chat-34285d8cca93fc0f473636e78680fade03f26bda.zip |
parallel tests (#7629)
Diffstat (limited to 'api4/command_test.go')
-rw-r--r-- | api4/command_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/api4/command_test.go b/api4/command_test.go index 9a6c9dc78..52ef0f841 100644 --- a/api4/command_test.go +++ b/api4/command_test.go @@ -4,6 +4,7 @@ package api4 import ( + "fmt" "strings" "testing" @@ -399,7 +400,7 @@ func TestExecuteCommand(t *testing.T) { postCmd := &model.Command{ CreatorId: th.BasicUser.Id, TeamId: th.BasicTeam.Id, - URL: "http://localhost" + *utils.Cfg.ServiceSettings.ListenAddress + model.API_URL_SUFFIX_V4 + "/teams/command_test", + URL: fmt.Sprintf("http://localhost:%v", th.App.Srv.ListenAddr.Port) + model.API_URL_SUFFIX_V4 + "/teams/command_test", Method: model.COMMAND_METHOD_POST, Trigger: "postcommand", } @@ -443,7 +444,7 @@ func TestExecuteCommand(t *testing.T) { getCmd := &model.Command{ CreatorId: th.BasicUser.Id, TeamId: th.BasicTeam.Id, - URL: "http://localhost" + *utils.Cfg.ServiceSettings.ListenAddress + model.API_URL_SUFFIX_V4 + "/teams/command_test", + URL: fmt.Sprintf("http://localhost:%v", th.App.Srv.ListenAddr.Port) + model.API_URL_SUFFIX_V4 + "/teams/command_test", Method: model.COMMAND_METHOD_GET, Trigger: "getcommand", } @@ -511,7 +512,7 @@ func TestExecuteCommandAgainstChannelOnAnotherTeam(t *testing.T) { postCmd := &model.Command{ CreatorId: th.BasicUser.Id, TeamId: team2.Id, - URL: "http://localhost" + *utils.Cfg.ServiceSettings.ListenAddress + model.API_URL_SUFFIX_V4 + "/teams/command_test", + URL: fmt.Sprintf("http://localhost:%v", th.App.Srv.ListenAddr.Port) + model.API_URL_SUFFIX_V4 + "/teams/command_test", Method: model.COMMAND_METHOD_POST, Trigger: "postcommand", } |