summaryrefslogtreecommitdiffstats
path: root/manualtesting/manual_testing.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-01-20 13:12:19 -0600
committerCorey Hulen <corey@hulen.com>2016-01-20 13:12:19 -0600
commit0b1aff3b24b4ac2df8e963c83d6e52b127c603f9 (patch)
tree47735a3dd609e025837df4460b0d030454358cf1 /manualtesting/manual_testing.go
parent1acd38b7b19521d06d274c42c00ce7072cd92196 (diff)
parent75f8729e2d25467500778e633c45c97e78a8f7a0 (diff)
downloadchat-0b1aff3b24b4ac2df8e963c83d6e52b127c603f9.tar.gz
chat-0b1aff3b24b4ac2df8e963c83d6e52b127c603f9.tar.bz2
chat-0b1aff3b24b4ac2df8e963c83d6e52b127c603f9.zip
Merge pull request #1930 from mattermost/PLT-7-server-db
PLT-7 adding loc for db calls
Diffstat (limited to 'manualtesting/manual_testing.go')
-rw-r--r--manualtesting/manual_testing.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/manualtesting/manual_testing.go b/manualtesting/manual_testing.go
index befc835fb..b9549690e 100644
--- a/manualtesting/manual_testing.go
+++ b/manualtesting/manual_testing.go
@@ -4,16 +4,18 @@
package manualtesting
import (
- l4g "github.com/alecthomas/log4go"
- "github.com/mattermost/platform/api"
- "github.com/mattermost/platform/model"
- "github.com/mattermost/platform/utils"
"hash/fnv"
"math/rand"
"net/http"
"net/url"
"strconv"
"time"
+
+ l4g "github.com/alecthomas/log4go"
+ "github.com/mattermost/platform/api"
+ "github.com/mattermost/platform/model"
+ "github.com/mattermost/platform/utils"
+ goi18n "github.com/nicksnyder/go-i18n/i18n"
)
type TestEnvironment struct {
@@ -70,7 +72,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
Type: model.TEAM_OPEN,
}
- if result := <-api.Srv.Store.Team().Save(team); result.Err != nil {
+ if result := <-api.Srv.Store.Team().Save(c.T, team); result.Err != nil {
c.Err = result.Err
return
} else {
@@ -98,7 +100,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
c.Err = err
return
}
- api.Srv.Store.User().VerifyEmail(result.Data.(*model.User).Id)
+ api.Srv.Store.User().VerifyEmail(c.T, result.Data.(*model.User).Id)
newuser := result.Data.(*model.User)
userID = newuser.Id
@@ -149,9 +151,9 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
}
}
-func getChannelID(channelname string, teamid string, userid string) (id string, err bool) {
+func getChannelID(T goi18n.TranslateFunc, channelname string, teamid string, userid string) (id string, err bool) {
// Grab all the channels
- result := <-api.Srv.Store.Channel().GetChannels(teamid, userid)
+ result := <-api.Srv.Store.Channel().GetChannels(T, teamid, userid)
if result.Err != nil {
l4g.Debug("Unable to get channels")
return "", false