* 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 удалений

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

@@ -32,12 +32,17 @@ import (
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
func newServer(t *testing.T) (*Server, error) {
return newServerWithConfig(t, func(_ *model.Config) {})
}
func newServerWithConfig(t *testing.T, f func(cfg *model.Config)) (*Server, error) {
configStore, err := config.NewMemoryStore()
require.NoError(t, err)
store, err := config.NewStoreFromBacking(configStore, nil, false)
require.NoError(t, err)
cfg := store.Get()
cfg.SqlSettings = *mainHelper.GetSQLSettings()
f(cfg)
store.Set(cfg)
@@ -61,13 +66,13 @@ func TestStartServerSuccess(t *testing.T) {
}
func TestStartServerPortUnavailable(t *testing.T) {
s, err := NewServer()
require.NoError(t, err)
// Listen on the next available port
listener, err := net.Listen("tcp", "localhost:0")
require.NoError(t, err)
s, err := newServer(t)
require.NoError(t, err)
// Attempt to listen on the port used above.
s.platform.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ListenAddress = listener.Addr().String()
@@ -105,6 +110,7 @@ func TestStartServerNoS3Bucket(t *testing.T) {
AmazonS3SSL: model.NewBool(false),
}
*cfg.ServiceSettings.ListenAddress = "localhost:0"
cfg.SqlSettings = *mainHelper.GetSQLSettings()
_, _, err := store.Set(cfg)
require.NoError(t, err)
@@ -162,7 +168,7 @@ func TestDatabaseTypeAndMattermostVersion(t *testing.T) {
os.Setenv("MM_SQLSETTINGS_DRIVERNAME", "postgres")
th := Setup(t)
th := Setup(t, SkipProductsInitialization())
defer th.TearDown()
databaseType, mattermostVersion := th.Server.DatabaseTypeAndSchemaVersion()
@@ -171,7 +177,7 @@ func TestDatabaseTypeAndMattermostVersion(t *testing.T) {
os.Setenv("MM_SQLSETTINGS_DRIVERNAME", "mysql")
th2 := Setup(t)
th2 := Setup(t, SkipProductsInitialization())
defer th2.TearDown()
databaseType, mattermostVersion = th2.Server.DatabaseTypeAndSchemaVersion()
@@ -190,6 +196,7 @@ func TestStartServerTLSVersion(t *testing.T) {
*cfg.ServiceSettings.TLSMinVer = "1.2"
*cfg.ServiceSettings.TLSKeyFile = path.Join(testDir, "tls_test_key.pem")
*cfg.ServiceSettings.TLSCertFile = path.Join(testDir, "tls_test_cert.pem")
cfg.SqlSettings = *mainHelper.GetSQLSettings()
store.Set(cfg)
@@ -316,7 +323,7 @@ func TestPanicLog(t *testing.T) {
logger.LockConfiguration()
// Creating a server with logger
s, err := NewServer()
s, err := newServer(t)
require.NoError(t, err)
s.Platform().SetLogger(logger)