summaryrefslogtreecommitdiffstats
path: root/api/command.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-07-08 11:50:10 -0400
committerChristopher Speller <crspeller@gmail.com>2015-07-20 17:45:23 -0400
commitc6fb95912bb481791c1ca370a46a4da9c05d05ad (patch)
treebb33ff7b494b45c9d95c15f290d97914e911ce91 /api/command.go
parenta1876cf6cc827743d8687a9113b727ef7190f452 (diff)
downloadchat-c6fb95912bb481791c1ca370a46a4da9c05d05ad.tar.gz
chat-c6fb95912bb481791c1ca370a46a4da9c05d05ad.tar.bz2
chat-c6fb95912bb481791c1ca370a46a4da9c05d05ad.zip
Changing the way we mattermost handles URLs. team.domain.com becomes domain.com/team.
Renaming team.Name to team.DisplayName and team.Domain to team.Name. So: team.Name -> url safe name. team.DisplayName -> nice name for users
Diffstat (limited to 'api/command.go')
-rw-r--r--api/command.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/api/command.go b/api/command.go
index ee7a11af3..f051bd42e 100644
--- a/api/command.go
+++ b/api/command.go
@@ -321,14 +321,14 @@ func loadTestSetupCommand(c *Context, command *model.Command) bool {
numPosts, _ = strconv.Atoi(tokens[numArgs+2])
}
}
- client := model.NewClient(c.TeamUrl + "/api/v1")
+ client := model.NewClient(c.GetSiteURL() + "/api/v1")
if doTeams {
if err := CreateBasicUser(client); err != nil {
l4g.Error("Failed to create testing enviroment")
return true
}
- client.LoginByEmail(BTEST_TEAM_DOMAIN_NAME, BTEST_USER_EMAIL, BTEST_USER_PASSWORD)
+ client.LoginByEmail(BTEST_TEAM_NAME, BTEST_USER_EMAIL, BTEST_USER_PASSWORD)
enviroment, err := CreateTestEnviromentWithTeams(
client,
utils.Range{numTeams, numTeams},
@@ -342,7 +342,7 @@ func loadTestSetupCommand(c *Context, command *model.Command) bool {
} else {
l4g.Info("Testing enviroment created")
for i := 0; i < len(enviroment.Teams); i++ {
- l4g.Info("Team Created: " + enviroment.Teams[i].Domain)
+ l4g.Info("Team Created: " + enviroment.Teams[i].Name)
l4g.Info("\t User to login: " + enviroment.Enviroments[i].Users[0].Email + ", " + USER_PASSWORD)
}
}
@@ -381,7 +381,7 @@ func loadTestUsersCommand(c *Context, command *model.Command) bool {
if err == false {
usersr = utils.Range{10, 15}
}
- client := model.NewClient(c.TeamUrl + "/api/v1")
+ client := model.NewClient(c.GetSiteURL() + "/api/v1")
userCreator := NewAutoUserCreator(client, c.Session.TeamId)
userCreator.Fuzzy = doFuzz
userCreator.CreateTestUsers(usersr)
@@ -411,7 +411,7 @@ func loadTestChannelsCommand(c *Context, command *model.Command) bool {
if err == false {
channelsr = utils.Range{20, 30}
}
- client := model.NewClient(c.TeamUrl + "/api/v1")
+ client := model.NewClient(c.GetSiteURL() + "/api/v1")
client.MockSession(c.Session.Id)
channelCreator := NewAutoChannelCreator(client, c.Session.TeamId)
channelCreator.Fuzzy = doFuzz
@@ -463,7 +463,7 @@ func loadTestPostsCommand(c *Context, command *model.Command) bool {
}
}
- client := model.NewClient(c.TeamUrl + "/api/v1")
+ client := model.NewClient(c.GetSiteURL() + "/api/v1")
client.MockSession(c.Session.Id)
testPoster := NewAutoPostCreator(client, command.ChannelId)
testPoster.Fuzzy = doFuzz