diff options
author | Joram Wilander <jwawilander@gmail.com> | 2018-05-16 13:43:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-16 13:43:22 -0400 |
commit | 1f6c271b3bedd6656ae7155714423b1b39a669c1 (patch) | |
tree | 9ce6390c237cc5f7c16d63addb4372033807cff8 /app/auto_environment.go | |
parent | 02f8c18f40cd0e973e4c75b751e8fcbbbd019728 (diff) | |
download | chat-1f6c271b3bedd6656ae7155714423b1b39a669c1.tar.gz chat-1f6c271b3bedd6656ae7155714423b1b39a669c1.tar.bz2 chat-1f6c271b3bedd6656ae7155714423b1b39a669c1.zip |
MM-8708 Remove api package (#8784)
* Remove api package
* Remove api dependency from cmd package
* Remove EnableAPIv3 setting
* Update web tests
* Add more websocket tests
* Move some ws and oauth tests to api4 package
* Move command tests into api4 package
* Test fixes
* Fix msg command test
* Add some app file tests
Diffstat (limited to 'app/auto_environment.go')
-rw-r--r-- | app/auto_environment.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/auto_environment.go b/app/auto_environment.go index 476a1c211..688940337 100644 --- a/app/auto_environment.go +++ b/app/auto_environment.go @@ -16,7 +16,7 @@ type TestEnvironment struct { Environments []TeamEnvironment } -func CreateTestEnvironmentWithTeams(a *App, client *model.Client, rangeTeams utils.Range, rangeChannels utils.Range, rangeUsers utils.Range, rangePosts utils.Range, fuzzy bool) (TestEnvironment, bool) { +func CreateTestEnvironmentWithTeams(a *App, client *model.Client4, rangeTeams utils.Range, rangeChannels utils.Range, rangeUsers utils.Range, rangePosts utils.Range, fuzzy bool) (TestEnvironment, bool) { rand.Seed(time.Now().UTC().UnixNano()) teamCreator := NewAutoTeamCreator(client) @@ -36,7 +36,6 @@ func CreateTestEnvironmentWithTeams(a *App, client *model.Client, rangeTeams uti return TestEnvironment{}, false } client.LoginById(randomUser.Id, USER_PASSWORD) - client.SetTeamId(team.Id) teamEnvironment, err := CreateTestEnvironmentInTeam(a, client, team, rangeChannels, rangeUsers, rangePosts, fuzzy) if !err { return TestEnvironment{}, false @@ -47,7 +46,7 @@ func CreateTestEnvironmentWithTeams(a *App, client *model.Client, rangeTeams uti return environment, true } -func CreateTestEnvironmentInTeam(a *App, client *model.Client, team *model.Team, rangeChannels utils.Range, rangeUsers utils.Range, rangePosts utils.Range, fuzzy bool) (TeamEnvironment, bool) { +func CreateTestEnvironmentInTeam(a *App, client *model.Client4, team *model.Team, rangeChannels utils.Range, rangeUsers utils.Range, rangePosts utils.Range, fuzzy bool) (TeamEnvironment, bool) { rand.Seed(time.Now().UTC().UnixNano()) // We need to create at least one user @@ -74,7 +73,7 @@ func CreateTestEnvironmentInTeam(a *App, client *model.Client, team *model.Team, for _, user := range users { for _, channel := range channels { client.LoginById(user.Id, USER_PASSWORD) - client.JoinChannel(channel.Id) + client.AddChannelMember(channel.Id, user.Id) } } |