summaryrefslogtreecommitdiffstats
path: root/manualtesting
diff options
context:
space:
mode:
authorElias Nahum <nahumhbl@gmail.com>2016-01-25 00:49:19 -0300
committerElias Nahum <nahumhbl@gmail.com>2016-01-25 00:57:16 -0300
commit7b3be6c77e622dedab0b8d8c1d5fd0e7aa76de46 (patch)
tree77dc7737757fa0623fa0171dbe6a3f854b53266c /manualtesting
parente880835fbbeea4c26fc9a94b1b0a92f7692b0b82 (diff)
downloadchat-7b3be6c77e622dedab0b8d8c1d5fd0e7aa76de46.tar.gz
chat-7b3be6c77e622dedab0b8d8c1d5fd0e7aa76de46.tar.bz2
chat-7b3be6c77e622dedab0b8d8c1d5fd0e7aa76de46.zip
PLT-7: Refactoring manuatesting & utils to use translations (chunk 5)
- Add spanish translations - Skip tests
Diffstat (limited to 'manualtesting')
-rw-r--r--manualtesting/manual_testing.go12
-rw-r--r--manualtesting/test_autolink.go5
2 files changed, 9 insertions, 8 deletions
diff --git a/manualtesting/manual_testing.go b/manualtesting/manual_testing.go
index befc835fb..2f1096fd5 100644
--- a/manualtesting/manual_testing.go
+++ b/manualtesting/manual_testing.go
@@ -32,12 +32,12 @@ func InitManualTesting() {
func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
// Let the world know
- l4g.Info("Setting up for manual test...")
+ l4g.Info(utils.T("manaultesting.manual_test.setup.info"))
// URL Parameters
params, err := url.ParseQuery(r.URL.RawQuery)
if err != nil {
- c.Err = model.NewAppError("/manual", "Unable to parse URL", "")
+ c.Err = model.NewLocAppError("/manual", "manaultesting.manual_test.parse.app_error", nil, "")
return
}
@@ -49,7 +49,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
hash := hasher.Sum32()
rand.Seed(int64(hash))
} else {
- l4g.Debug("No uid in url")
+ l4g.Debug(utils.T("manaultesting.manual_test.uid.debug"))
}
// Create a client for tests to use
@@ -61,7 +61,7 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) {
var teamID string
var userID string
if ok1 && ok2 {
- l4g.Info("Creating user and team")
+ l4g.Info(utils.T("manaultesting.manual_test.create.info"))
// Create team for testing
team := &model.Team{
DisplayName: teamDisplayName[0],
@@ -153,7 +153,7 @@ func getChannelID(channelname string, teamid string, userid string) (id string,
// Grab all the channels
result := <-api.Srv.Store.Channel().GetChannels(teamid, userid)
if result.Err != nil {
- l4g.Debug("Unable to get channels")
+ l4g.Debug(utils.T("manaultesting.get_channel_id.unable.debug"))
return "", false
}
@@ -164,6 +164,6 @@ func getChannelID(channelname string, teamid string, userid string) (id string,
return channel.Id, true
}
}
- l4g.Debug("Could not find channel: " + channelname + ", " + strconv.Itoa(len(data.Channels)) + " possibilites searched")
+ l4g.Debug(utils.T("manaultesting.get_channel_id.no_found.debug"), channelname, strconv.Itoa(len(data.Channels)))
return "", false
}
diff --git a/manualtesting/test_autolink.go b/manualtesting/test_autolink.go
index 16d2d713a..f9f213da1 100644
--- a/manualtesting/test_autolink.go
+++ b/manualtesting/test_autolink.go
@@ -6,6 +6,7 @@ package manualtesting
import (
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
+ "github.com/mattermost/platform/utils"
)
const LINK_POST_TEXT = `
@@ -20,10 +21,10 @@ 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")
+ l4g.Info(utils.T("manaultesting.test_autolink.info"))
channelID, err := getChannelID(model.DEFAULT_CHANNEL, env.CreatedTeamId, env.CreatedUserId)
if err != true {
- return model.NewAppError("/manualtest", "Unable to get channels", "")
+ return model.NewLocAppError("/manualtest", "manaultesting.test_autolink.unable.app_error", nil, "")
}
post := &model.Post{