[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
@@ -18,6 +18,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGetGroup(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -69,6 +70,7 @@ func TestGetGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateGroup(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -179,6 +181,7 @@ func TestCreateGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDeleteGroup(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -224,6 +227,7 @@ func TestDeleteGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUndeleteGroup(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -256,6 +260,7 @@ func TestUndeleteGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPatchGroup(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -359,6 +364,7 @@ func TestPatchGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLinkGroupTeam(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -472,6 +478,7 @@ func TestLinkGroupTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLinkGroupChannel(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -597,6 +604,7 @@ func TestLinkGroupChannel(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUnlinkGroupTeam(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -716,6 +724,7 @@ func TestUnlinkGroupTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUnlinkGroupChannel(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -997,6 +1006,7 @@ func TestUnlinkGroupChannel(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupTeam(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1060,6 +1070,7 @@ func TestGetGroupTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupChannel(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1123,6 +1134,7 @@ func TestGetGroupChannel(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupTeams(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1177,6 +1189,7 @@ func TestGetGroupTeams(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupChannels(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1230,6 +1243,7 @@ func TestGetGroupChannels(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPatchGroupTeam(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1303,6 +1317,7 @@ func TestPatchGroupTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPatchGroupChannel(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1387,6 +1402,7 @@ func TestPatchGroupChannel(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupsByChannel(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1530,6 +1546,7 @@ func TestGetGroupsByChannel(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupsAssociatedToChannelsByTeam(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1682,6 +1699,7 @@ func TestGetGroupsAssociatedToChannelsByTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupsByTeam(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -1874,6 +1892,7 @@ func TestGetGroupsByTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroups(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -2256,6 +2275,7 @@ func TestGetGroups(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupsByUserId(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -2327,6 +2347,7 @@ func TestGetGroupsByUserId(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupMembers(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -2394,6 +2415,7 @@ func TestGetGroupMembers(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupStats(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -2443,6 +2465,7 @@ func TestGetGroupStats(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetGroupsGroupConstrainedParentTeam(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -2526,6 +2549,7 @@ func TestGetGroupsGroupConstrainedParentTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddMembersToGroup(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
@@ -2699,6 +2723,7 @@ func TestAddMembersToGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDeleteMembersFromGroup(t *testing.T) {
|
||||
mainHelper.Parallel(t)
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user