summaryrefslogtreecommitdiffstats
path: root/api/command_loadtest.go
diff options
context:
space:
mode:
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)