summaryrefslogtreecommitdiffstats
path: root/api/command.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-07-21 10:47:46 -0800
committerCorey Hulen <corey@hulen.com>2015-07-21 10:47:46 -0800
commitbee26e3f2654ce7acce647818847480569236343 (patch)
treead9032009e18b78c3ffca6e9e48fc4467ddd282b /api/command.go
parentdc250d77310e8b38b445bcaa4ae8f2d5df97cc1e (diff)
parentc6fb95912bb481791c1ca370a46a4da9c05d05ad (diff)
downloadchat-bee26e3f2654ce7acce647818847480569236343.tar.gz
chat-bee26e3f2654ce7acce647818847480569236343.tar.bz2
chat-bee26e3f2654ce7acce647818847480569236343.zip
Merge pull request #200 from mattermost/mm-1356
MM-1356 Changing team URLs from team.domain.com to domain.com/team
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