summaryrefslogtreecommitdiffstats
path: root/manualtesting
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-01-20 13:36:16 -0600
committerCorey Hulen <corey@hulen.com>2016-01-20 13:36:16 -0600
commitaefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b (patch)
treed87809ff2a306e5428b0ab6973d05509baa21abd /manualtesting
parent0b1aff3b24b4ac2df8e963c83d6e52b127c603f9 (diff)
downloadchat-aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b.tar.gz
chat-aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b.tar.bz2
chat-aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b.zip
Revert " PLT-7 adding loc for db calls"
Diffstat (limited to 'manualtesting')
-rw-r--r--manualtesting/manual_testing.go18
-rw-r--r--manualtesting/test_autolink.go3
2 files changed, 9 insertions, 12 deletions
diff --git a/manualtesting/manual_testing.go b/manualtesting/manual_testing.go
index b9549690e..befc835fb 100644
--- a/manualtesting/manual_testing.go
+++ b/manualtesting/manual_testing.go
@@ -4,18 +4,16 @@
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 {
@@ -72,7 +70,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
Type: model.TEAM_OPEN,
}
- if result := <-api.Srv.Store.Team().Save(c.T, team); result.Err != nil {
+ if result := <-api.Srv.Store.Team().Save(team); result.Err != nil {
c.Err = result.Err
return
} else {
@@ -100,7 +98,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
c.Err = err
return
}
- api.Srv.Store.User().VerifyEmail(c.T, result.Data.(*model.User).Id)
+ api.Srv.Store.User().VerifyEmail(result.Data.(*model.User).Id)
newuser := result.Data.(*model.User)
userID = newuser.Id
@@ -151,9 +149,9 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
}
}
-func getChannelID(T goi18n.TranslateFunc, channelname string, teamid string, userid string) (id string, err bool) {
+func getChannelID(channelname string, teamid string, userid string) (id string, err bool) {
// Grab all the channels
- result := <-api.Srv.Store.Channel().GetChannels(T, teamid, userid)
+ result := <-api.Srv.Store.Channel().GetChannels(teamid, userid)
if result.Err != nil {
l4g.Debug("Unable to get channels")
return "", false
diff --git a/manualtesting/test_autolink.go b/manualtesting/test_autolink.go
index a44b247b7..16d2d713a 100644
--- a/manualtesting/test_autolink.go
+++ b/manualtesting/test_autolink.go
@@ -6,7 +6,6 @@ package manualtesting
import (
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
- "github.com/mattermost/platform/utils"
)
const LINK_POST_TEXT = `
@@ -22,7 +21,7 @@ https://medium.com/@slackhq/11-useful-tips-for-getting-the-most-of-slack-5dfb3d1
func testAutoLink(env TestEnvironment) *model.AppError {
l4g.Info("Manual Auto Link Test")
- channelID, err := getChannelID(utils.T, model.DEFAULT_CHANNEL, env.CreatedTeamId, env.CreatedUserId)
+ channelID, err := getChannelID(model.DEFAULT_CHANNEL, env.CreatedTeamId, env.CreatedUserId)
if err != true {
return model.NewAppError("/manualtest", "Unable to get channels", "")
}