From eb78d273f39202046fa71555a5a19b0ec8a95cb3 Mon Sep 17 00:00:00 2001 From: Martin Kraft Date: Mon, 21 May 2018 06:10:26 -0400 Subject: Refactors migrations check. (#8814) --- api4/channel_test.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'api4/channel_test.go') diff --git a/api4/channel_test.go b/api4/channel_test.go index f871e66ea..8fd68fc08 100644 --- a/api4/channel_test.go +++ b/api4/channel_test.go @@ -12,8 +12,6 @@ import ( "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" ) @@ -1892,16 +1890,7 @@ func TestUpdateChannelScheme(t *testing.T) { th.App.SetLicense(model.NewTestLicense("")) - // Mark the migration as done. - <-th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2) - res := <-th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"}) - assert.Nil(t, res.Err) - - // Un-mark the migration at the end of the test. - defer func() { - res := <-th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2) - assert.Nil(t, res.Err) - }() + th.App.SetPhase2PermissionsMigrationStatus(true) team := &model.Team{ DisplayName: "Name", -- cgit v1.2.3-1-g7c22