diff options
author | Chris <ccbrown112@gmail.com> | 2017-11-03 10:25:38 -0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-11-03 08:25:38 -0700 |
commit | d5dbdb273703a3add0f1c3287aa531854ab30269 (patch) | |
tree | 6b1fb9079f9fae9d25bdb7ea459261383ee720d6 /manualtesting/manual_testing.go | |
parent | 9d32cd42085bbb37460d815c6c1a00ad881c4895 (diff) | |
download | chat-d5dbdb273703a3add0f1c3287aa531854ab30269.tar.gz chat-d5dbdb273703a3add0f1c3287aa531854ab30269.tar.bz2 chat-d5dbdb273703a3add0f1c3287aa531854ab30269.zip |
several one-line panic, race, and logic fixes (#7766)
Diffstat (limited to 'manualtesting/manual_testing.go')
-rw-r--r-- | manualtesting/manual_testing.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/manualtesting/manual_testing.go b/manualtesting/manual_testing.go index 75274a24b..20b7a2dfd 100644 --- a/manualtesting/manual_testing.go +++ b/manualtesting/manual_testing.go @@ -138,18 +138,16 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) { // Grab the test ID and pick the test testname, ok := params["test"] - var err2 *model.AppError + if !ok { + c.Err = model.NewAppError("/manual", "manaultesting.manual_test.parse.app_error", nil, "", http.StatusBadRequest) + return + } + switch testname[0] { case "autolink": - err2 = testAutoLink(env) + c.Err = testAutoLink(env) // ADD YOUR NEW TEST HERE! case "general": - err2 = nil - } - - if err != nil { - c.Err = err2 - return } } |