diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-04 13:09:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-04 13:09:41 -0700 |
commit | 07777f5ff9e0bde26abd0288164e5f73b6da992a (patch) | |
tree | b0aa1eff510d1531d2924522e0e6f0e9bfd7ac29 /app/team_test.go | |
parent | dc9b1a1d6a0fe7ad2e18597cb46f3874736b4b40 (diff) | |
download | chat-07777f5ff9e0bde26abd0288164e5f73b6da992a.tar.gz chat-07777f5ff9e0bde26abd0288164e5f73b6da992a.tar.bz2 chat-07777f5ff9e0bde26abd0288164e5f73b6da992a.zip |
Fix races / finally remove global app for good (#7570)
* finally remove global app for good
* test compilation fixes
* fix races
* fix deadlock
* wake up write pump so it doesn't take forever to clean up
Diffstat (limited to 'app/team_test.go')
-rw-r--r-- | app/team_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/team_test.go b/app/team_test.go index b074ed14f..7992dd0c3 100644 --- a/app/team_test.go +++ b/app/team_test.go @@ -12,6 +12,7 @@ import ( func TestCreateTeam(t *testing.T) { th := Setup().InitBasic() + defer th.TearDown() id := model.NewId() team := &model.Team{ @@ -33,6 +34,7 @@ func TestCreateTeam(t *testing.T) { func TestCreateTeamWithUser(t *testing.T) { th := Setup().InitBasic() + defer th.TearDown() id := model.NewId() team := &model.Team{ @@ -76,6 +78,7 @@ func TestCreateTeamWithUser(t *testing.T) { func TestUpdateTeam(t *testing.T) { th := Setup().InitBasic() + defer th.TearDown() th.BasicTeam.DisplayName = "Testing 123" @@ -91,6 +94,7 @@ func TestUpdateTeam(t *testing.T) { func TestAddUserToTeam(t *testing.T) { th := Setup().InitBasic() + defer th.TearDown() user := model.User{Email: strings.ToLower(model.NewId()) + "success+test@example.com", Nickname: "Darth Vader", Username: "vader" + model.NewId(), Password: "passwd1", AuthService: ""} ruser, _ := th.App.CreateUser(&user) @@ -103,6 +107,7 @@ func TestAddUserToTeam(t *testing.T) { func TestAddUserToTeamByTeamId(t *testing.T) { th := Setup().InitBasic() + defer th.TearDown() user := model.User{Email: strings.ToLower(model.NewId()) + "success+test@example.com", Nickname: "Darth Vader", Username: "vader" + model.NewId(), Password: "passwd1", AuthService: ""} ruser, _ := th.App.CreateUser(&user) @@ -115,6 +120,7 @@ func TestAddUserToTeamByTeamId(t *testing.T) { func TestPermanentDeleteTeam(t *testing.T) { th := Setup().InitBasic() + defer th.TearDown() team, err := th.App.CreateTeam(&model.Team{ DisplayName: "deletion-test", |