summaryrefslogtreecommitdiffstats
path: root/api/command_loadtest.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-02-01 18:52:43 -0800
committer=Corey Hulen <corey@hulen.com>2016-02-01 18:52:43 -0800
commit27586a320add265f3e032d2cb21b27e93b51a2b0 (patch)
tree5158d1ffeb0f3a922b0036f560b3c99862373275 /api/command_loadtest.go
parentb4ec6900510077253290e361d1a706e5368a45de (diff)
downloadchat-27586a320add265f3e032d2cb21b27e93b51a2b0.tar.gz
chat-27586a320add265f3e032d2cb21b27e93b51a2b0.tar.bz2
chat-27586a320add265f3e032d2cb21b27e93b51a2b0.zip
Adding loc to new command backend
Diffstat (limited to 'api/command_loadtest.go')
-rw-r--r--api/command_loadtest.go20
1 files changed, 14 insertions, 6 deletions
diff --git a/api/command_loadtest.go b/api/command_loadtest.go
index 8f79006b4..e320176f4 100644
--- a/api/command_loadtest.go
+++ b/api/command_loadtest.go
@@ -52,6 +52,10 @@ var usage = `Mattermost load testing commands to help configure the system
`
+const (
+ CMD_LOADTEST = "loadtest"
+)
+
type LoadTestProvider struct {
}
@@ -61,9 +65,13 @@ func init() {
}
}
-func (me *LoadTestProvider) GetCommand() *model.Command {
+func (me *LoadTestProvider) GetTrigger() string {
+ return CMD_LOADTEST
+}
+
+func (me *LoadTestProvider) GetCommand(c *Context) *model.Command {
return &model.Command{
- Trigger: "loadtest",
+ Trigger: CMD_LOADTEST,
AutoComplete: false,
AutoCompleteDesc: "Debug Load Testing",
AutoCompleteHint: "help",
@@ -73,10 +81,10 @@ func (me *LoadTestProvider) GetCommand() *model.Command {
func (me *LoadTestProvider) DoCommand(c *Context, channelId string, message string) *model.CommandResponse {
- // This command is only available when EnableTesting is true
- // if !utils.Cfg.ServiceSettings.EnableTesting {
- // return &model.CommandResponse{}
- // }
+ //This command is only available when EnableTesting is true
+ if !utils.Cfg.ServiceSettings.EnableTesting {
+ return &model.CommandResponse{}
+ }
if strings.HasPrefix(message, "setup") {
return me.SetupCommand(c, channelId, message)