Migrate System store to Sync by default (#10838)

Этот коммит содержится в:
Jesús Espino
2019-05-21 18:22:27 +02:00
коммит произвёл GitHub
родитель 3e6fed8df4
Коммит f8a89a52fc
22 изменённых файлов: 310 добавлений и 295 удалений

Просмотреть файл

@@ -22,10 +22,10 @@ func TestImportImportScheme(t *testing.T) {
defer th.TearDown()
// Mark the phase 2 permissions migration as completed.
<-th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
defer func() {
<-th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
}()
// Try importing an invalid scheme in dryRun mode.
@@ -243,10 +243,10 @@ func TestImportImportSchemeWithoutGuestRoles(t *testing.T) {
defer th.TearDown()
// Mark the phase 2 permissions migration as completed.
<-th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
defer func() {
<-th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
}()
// Try importing an invalid scheme in dryRun mode.
@@ -558,10 +558,10 @@ func TestImportImportTeam(t *testing.T) {
defer th.TearDown()
// Mark the phase 2 permissions migration as completed.
<-th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
defer func() {
<-th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
}()
scheme1 := th.SetupTeamScheme()
@@ -659,10 +659,10 @@ func TestImportImportChannel(t *testing.T) {
defer th.TearDown()
// Mark the phase 2 permissions migration as completed.
<-th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
defer func() {
<-th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
}()
scheme1 := th.SetupChannelScheme()
@@ -1505,10 +1505,10 @@ func TestImportImportUser(t *testing.T) {
// to the appropriate scheme-managed-role booleans.
// Mark the phase 2 permissions migration as completed.
<-th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
th.App.Srv.Store.System().Save(&model.System{Name: model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2, Value: "true"})
defer func() {
<-th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
th.App.Srv.Store.System().PermanentDeleteByName(model.MIGRATION_KEY_ADVANCED_PERMISSIONS_PHASE_2)
}()
teamSchemeData := &SchemeImportData{