* Enable products for channels tests

* increase unit test timeout; check IsConfigReadOnly

* make app-layers

* Avoid loading boards tempaltes between tests to improve speed

* Fix delete query to be compatible with both databases

* Avoid preserving the templates for boards store tests

* Run all tests in one command

* Revert "Run all tests in one command"

This reverts commit 0330f7cd8f96b47776770e8f80ba6ba18d98b8d1.

* concurrent pkg group tests in CI

* Revert "Revert "Run all tests in one command""

This reverts commit 73892fec772575ff054a99ba9e00a7b57ca74164.

* Revert "concurrent pkg group tests in CI"

This reverts commit 550fb6cdd4a7f14d9632f2626bc66f389173b5d9.

* try testing 3 subsets of packages concurrently to improve time taken

* Revert "try testing 3 subsets of packages concurrently to improve time taken"

This reverts commit 97475f3c4eafa8bbe047097e0841220884f68cdc.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: wiggin77 <wiggin77@warpmail.net>
Этот коммит содержится в:
Miguel de la Cruz
2023-04-18 13:58:33 +02:00
коммит произвёл GitHub
родитель a8d79ec3da
Коммит 067e36c23c
43 изменённых файлов: 377 добавлений и 105 удалений

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

@@ -55,7 +55,7 @@ func SetupWithStoreMock(tb testing.TB) *TestHelper {
tb.SkipNow()
}
th := setupTestHelper(tb, false)
th := setupTestHelper(tb, false, []app.Option{app.SkipProductsInitialization()})
emptyMockStore := mocks.Store{}
emptyMockStore.On("Close").Return(nil)
th.App.Srv().SetStore(&emptyMockStore)
@@ -68,17 +68,18 @@ func Setup(tb testing.TB) *TestHelper {
}
store := mainHelper.GetStore()
store.DropAllTables()
return setupTestHelper(tb, true)
mainHelper.PreloadBoardsMigrationsIfNeeded()
return setupTestHelper(tb, true, nil)
}
func setupTestHelper(tb testing.TB, includeCacheLayer bool) *TestHelper {
func setupTestHelper(tb testing.TB, includeCacheLayer bool, options []app.Option) *TestHelper {
memoryStore := config.NewTestMemoryStore()
newConfig := memoryStore.Get().Clone()
newConfig.SqlSettings = *mainHelper.GetSQLSettings()
*newConfig.AnnouncementSettings.AdminNoticesEnabled = false
*newConfig.AnnouncementSettings.UserNoticesEnabled = false
*newConfig.PluginSettings.AutomaticPrepackagedPlugins = false
memoryStore.Set(newConfig)
var options []app.Option
options = append(options, app.ConfigStore(memoryStore))
options = append(options, app.StoreOverride(mainHelper.Store))