summaryrefslogtreecommitdiffstats
path: root/app/import_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-04 13:09:41 -0700
committerGitHub <noreply@github.com>2017-10-04 13:09:41 -0700
commit07777f5ff9e0bde26abd0288164e5f73b6da992a (patch)
treeb0aa1eff510d1531d2924522e0e6f0e9bfd7ac29 /app/import_test.go
parentdc9b1a1d6a0fe7ad2e18597cb46f3874736b4b40 (diff)
downloadchat-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/import_test.go')
-rw-r--r--app/import_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/import_test.go b/app/import_test.go
index 86485900d..ccd49608e 100644
--- a/app/import_test.go
+++ b/app/import_test.go
@@ -966,6 +966,7 @@ func TestImportValidateDirectPostImportData(t *testing.T) {
func TestImportImportTeam(t *testing.T) {
th := Setup()
+ defer th.TearDown()
// Check how many teams are in the database.
var teamsCount int64
@@ -1074,6 +1075,7 @@ func TestImportImportTeam(t *testing.T) {
func TestImportImportChannel(t *testing.T) {
th := Setup()
+ defer th.TearDown()
// Import a Team.
teamName := model.NewId()
@@ -1233,6 +1235,7 @@ func TestImportImportChannel(t *testing.T) {
func TestImportImportUser(t *testing.T) {
th := Setup()
+ defer th.TearDown()
// Check how many users are in the database.
var userCount int64
@@ -1910,6 +1913,7 @@ func AssertAllPostsCount(t *testing.T, a *App, initialCount int64, change int64,
func TestImportImportPost(t *testing.T) {
th := Setup()
+ defer th.TearDown()
// Create a Team.
teamName := model.NewId()
@@ -2190,6 +2194,7 @@ func TestImportImportPost(t *testing.T) {
func TestImportImportDirectChannel(t *testing.T) {
th := Setup().InitBasic()
+ defer th.TearDown()
// Check how many channels are in the database.
var directChannelCount int64
@@ -2400,6 +2405,7 @@ func AssertChannelCount(t *testing.T, a *App, channelType string, expectedCount
func TestImportImportDirectPost(t *testing.T) {
th := Setup().InitBasic()
+ defer th.TearDown()
// Create the DIRECT channel.
channelData := DirectChannelImportData{
@@ -2798,6 +2804,7 @@ func TestImportImportDirectPost(t *testing.T) {
func TestImportImportLine(t *testing.T) {
th := Setup()
+ defer th.TearDown()
// Try import line with an invalid type.
line := LineImportData{
@@ -2847,6 +2854,7 @@ func TestImportImportLine(t *testing.T) {
func TestImportBulkImport(t *testing.T) {
th := Setup()
+ defer th.TearDown()
teamName := model.NewId()
channelName := model.NewId()
@@ -2888,8 +2896,6 @@ func TestImportBulkImport(t *testing.T) {
}
func TestImportProcessImportDataFileVersionLine(t *testing.T) {
- Setup()
-
data := LineImportData{
Type: "version",
Version: ptrInt(1),