summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-22 16:42:38 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-22 16:42:38 -0600
commit6b534f1b0dae2614ec267a82f1c4dc1b096b7b1c (patch)
tree465e20f57b95e33fb0cf0a858f993ceda33a9cea /api
parentc2d98c2c1f4860c11aedf43aff5e360256a89835 (diff)
downloadchat-6b534f1b0dae2614ec267a82f1c4dc1b096b7b1c.tar.gz
chat-6b534f1b0dae2614ec267a82f1c4dc1b096b7b1c.tar.bz2
chat-6b534f1b0dae2614ec267a82f1c4dc1b096b7b1c.zip
Merging
Diffstat (limited to 'api')
-rw-r--r--api/command.go4
-rw-r--r--api/command_loadtest_test.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/api/command.go b/api/command.go
index faa7804f6..985735fe2 100644
--- a/api/command.go
+++ b/api/command.go
@@ -36,7 +36,7 @@ func GetCommandProvidersProvider(name string) CommandProvider {
}
func InitCommand(r *mux.Router) {
- l4g.Debug("Initializing command api routes")
+ l4g.Debug(utils.T("api.command.init.debug"))
sr := r.PathPrefix("/commands").Subrouter()
@@ -87,7 +87,7 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) {
channelId := strings.TrimSpace(props["channelId"])
if len(command) <= 1 || strings.Index(command, "/") != 0 {
- c.Err = model.NewAppError("command", "Command must start with /", "")
+ c.Err = model.NewLocAppError("executeCommand", "api.command.check_command.start.app_error", nil, "")
return
}
diff --git a/api/command_loadtest_test.go b/api/command_loadtest_test.go
index 4af2a636a..2ae426dc0 100644
--- a/api/command_loadtest_test.go
+++ b/api/command_loadtest_test.go
@@ -190,8 +190,9 @@ func TestLoadTestUrlCommands(t *testing.T) {
t.Fatal("/loadtest url with no url should've failed")
}
- command = "/loadtest url http://www.hopefullynonexistent.file/path/asdf/qwerty"
+ command = "/loadtest url http://missingfiletonwhere/path/asdf/qwerty"
if r := Client.Must(Client.Command(channel.Id, command, false)).Data.(*model.CommandResponse); r.Text != "Unable to get file" {
+ t.Log(r.Text)
t.Fatal("/loadtest url with invalid url should've failed")
}