diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-21 12:26:27 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-21 12:26:27 -0800 |
commit | 848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09 (patch) | |
tree | 98390442e8052b8e02469e5ccf7596e22b7ea07f /api/command.go | |
parent | e87adce4a059b97a65198b326be6304abdf4e657 (diff) | |
parent | bee26e3f2654ce7acce647818847480569236343 (diff) | |
download | chat-848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09.tar.gz chat-848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09.tar.bz2 chat-848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09.zip |
fixing merge conflicts
Diffstat (limited to 'api/command.go')
-rw-r--r-- | api/command.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/api/command.go b/api/command.go index 810a8a07e..f051bd42e 100644 --- a/api/command.go +++ b/api/command.go @@ -27,8 +27,6 @@ var commands = []commandHandler{ func InitCommand(r *mux.Router) { l4g.Debug("Initializing command api routes") r.Handle("/command", ApiUserRequired(command)).Methods("POST") - - hub.Start() } func command(c *Context, w http.ResponseWriter, r *http.Request) { @@ -323,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}, @@ -344,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) } } @@ -383,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) @@ -413,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 @@ -465,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 |