[MM-62408] Server Code Coverage with Fully Parallel Tests (#30078)
* TestPool * Store infra * Store tests updates * Bump maximum concurrent postgres connections * More infra * channels/jobs * channels/app * channels/api4 * Protect i18n from concurrent access * Replace some use of os.Setenv * Remove debug * Lint fixes * Fix more linting * Fix test * Remove use of Setenv in drafts tests * Fix flaky TestWebHubCloseConnOnDBFail * Fix merge * [MM-62408] Add CI job to generate test coverage (#30284) * Add CI job to generate test coverage * Remove use of Setenv in drafts tests * Fix flaky TestWebHubCloseConnOnDBFail * Fix more Setenv usage * Fix more potential flakyness * Remove parallelism from flaky test * Remove conflicting env var * Fix * Disable parallelism * Test atomic covermode * Disable parallelism * Enable parallelism * Add upload coverage step * Fix codecov.yml * Add codecov.yml * Remove redundant workspace field * Add Parallel() util methods and refactor * Fix formatting * More formatting fixes * Fix reporting
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1cf2f08108
Коммит
611b2a8e79
@@ -13,7 +13,8 @@ import (
|
||||
)
|
||||
|
||||
func TestGetTimeSortedPostAccessibleBounds(t *testing.T) {
|
||||
var postFromCreateAt = func(at int64) *model.Post {
|
||||
mainHelper.Parallel(t)
|
||||
postFromCreateAt := func(at int64) *model.Post {
|
||||
return &model.Post{CreateAt: at}
|
||||
}
|
||||
|
||||
@@ -193,6 +194,7 @@ func TestGetTimeSortedPostAccessibleBounds(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFilterInaccessiblePosts(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
|
||||
err := th.App.Srv().Store().System().Save(&model.System{
|
||||
@@ -203,7 +205,7 @@ func TestFilterInaccessiblePosts(t *testing.T) {
|
||||
|
||||
defer th.TearDown()
|
||||
|
||||
var postFromCreateAt = func(at int64) *model.Post {
|
||||
postFromCreateAt := func(at int64) *model.Post {
|
||||
return &model.Post{CreateAt: at}
|
||||
}
|
||||
|
||||
@@ -322,6 +324,7 @@ func TestFilterInaccessiblePosts(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetFilteredAccessiblePosts(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
|
||||
err := th.App.Srv().Store().System().Save(&model.System{
|
||||
@@ -332,7 +335,7 @@ func TestGetFilteredAccessiblePosts(t *testing.T) {
|
||||
|
||||
defer th.TearDown()
|
||||
|
||||
var postFromCreateAt = func(at int64) *model.Post {
|
||||
postFromCreateAt := func(at int64) *model.Post {
|
||||
return &model.Post{CreateAt: at}
|
||||
}
|
||||
|
||||
@@ -364,6 +367,7 @@ func TestGetFilteredAccessiblePosts(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIsInaccessiblePost(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
|
||||
err := th.App.Srv().Store().System().Save(&model.System{
|
||||
@@ -386,6 +390,7 @@ func TestIsInaccessiblePost(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_getInaccessibleRange(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
type test struct {
|
||||
label string
|
||||
bounds accessibleBounds
|
||||
|
||||
Ссылка в новой задаче
Block a user