Revert testing workarounds (#22630)
* Revert "fix store issue take two" This reverts commit 59f943c2c7ff7d88f7b36cc29e242042746e959e. * Revert "fix store override issue" This reverts commit 29c346757aa627c07d357c54991f9188c927dd1a. * Revert "Fix TestPushNotificationRace" This reverts commit 6d62dddf8679e82b02e8ad9fe7513217eef5b4ee. * Revert "fix default DSN for CI" This reverts commit e0e69cdbb0645bb50434f6b5bbd12bead1e7ce1d. * Revert "disable playbooks from more unit tests" This reverts commit a1e97a9e96bdd16537f5b6dbdc8335762617a9e0. * Revert "disable playbooks for more tests" This reverts commit 4d2dc74f05339f0b3cd28b997a2e35ae20f898be. * Revert "disable playbooks for TestSAMLSettings" This reverts commit 35c1a4312d0c6a0a64991520fa5b0892c083e6a1. * Revert "disable playbooks for more unit tests" This reverts commit c049631a1474cddf168b2be8feb24140e0dcfd48. * Revert "disable playbooks for mocked enterprise tests" This reverts commit 829317fddbd0e84866534a5a75e52dcffd2dbde7. * Partially revert "disable playbooks for channel/apps mocked tests" This reverts commit 52b4a0a6cf135d26f53298294ed23734aafae0d2. * Revert "fix TestUnitUpdateConfig" This reverts commit 8f134f2a8ae9765aa2b6f66d6827e10ef1f5109f. * Revert "add plugin mock to TestUnitUpdateConfig" This reverts commit 3ec5419092135f494fd04701b5cbbd15920e667b. * Revert "disable Boards for more test helpers" This reverts commit 5d4d0d02d9cf6f872f0304098c68a01a3aab0fbe. * Revert "disable boards at correct place in test helpers" This reverts commit 0c9e175f79293c8be4289c7424930388f207dc75. * Partially revert "disable boards for slash cmd tests" This reverts commit fad8d9de93f5ce351d2e50fd6448662e75f597ae. * Revert "disable Boards for channels web tests" This reverts commit 15540fdfc09cf927071af718d4ad0b2c58308328. * Revert "Adds a teardown function to playbook server tests to disable and reenable boards" This reverts commit 9a46e3d0f43f66d548994986b8c4029d58ad022f. * Revert "Test disable boards through feature flag" This reverts commit 787044add8ba8e2680a2c3c6ba11e709cebc8705. * TestUnitUpdateConfig: restore callback check * Revert "Revert "fix default DSN for CI"" This reverts commit 01b879d55ad1249265f23c6fd9ceb5d7730ddb3d.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d62244aebb
Коммит
80c1431983
@@ -15,8 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func TestActionCreation(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
createNewChannel := func(t *testing.T, name string) *model.Channel {
|
||||
@@ -201,8 +200,7 @@ func TestActionCreation(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActionList(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
// Create three valid actions
|
||||
@@ -294,8 +292,7 @@ func TestActionList(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestActionUpdate(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
// Create a valid action
|
||||
|
||||
@@ -16,8 +16,7 @@ func TestTrialLicences(t *testing.T) {
|
||||
// This test is flaky due to upstream connectivity issues.
|
||||
t.Skip()
|
||||
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("request trial license without permissions", func(t *testing.T) {
|
||||
|
||||
@@ -11,8 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestAPI(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
|
||||
t.Run("404", func(t *testing.T) {
|
||||
|
||||
@@ -21,8 +21,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGraphQLPlaybooks(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("basic get", func(t *testing.T) {
|
||||
@@ -206,8 +205,7 @@ func TestGraphQLPlaybooks(t *testing.T) {
|
||||
|
||||
}
|
||||
func TestGraphQLUpdatePlaybookFails(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("update playbook fails because size constraints.", func(t *testing.T) {
|
||||
@@ -370,8 +368,7 @@ func TestGraphQLUpdatePlaybookFails(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdatePlaybookFavorite(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("favorite", func(t *testing.T) {
|
||||
@@ -493,8 +490,7 @@ func gqlTestPlaybookUpdate(e *TestEnvironment, t *testing.T, playbookID string,
|
||||
}
|
||||
|
||||
func TestGraphQLPlaybooksMetrics(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("metrics get", func(t *testing.T) {
|
||||
|
||||
@@ -20,8 +20,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGraphQLRunList(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("list by participantOrFollower", func(t *testing.T) {
|
||||
@@ -206,8 +205,7 @@ func TestGraphQLRunList(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGraphQLChangeRunParticipants(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
user3, _, err := e.ServerAdminClient.CreateUser(&model.User{
|
||||
@@ -669,8 +667,7 @@ func TestGraphQLChangeRunParticipants(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGraphQLChangeRunOwner(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
// create a third user to test change owner
|
||||
@@ -713,8 +710,7 @@ func TestGraphQLChangeRunOwner(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSetRunFavorite(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
createRun := func() *client.PlaybookRun {
|
||||
@@ -800,8 +796,7 @@ func TestSetRunFavorite(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestResolverFavorites(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
createRun := func() *client.PlaybookRun {
|
||||
@@ -833,8 +828,7 @@ func TestResolverFavorites(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestResolverPlaybooks(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
createRun := func() *client.PlaybookRun {
|
||||
@@ -860,8 +854,7 @@ func TestResolverPlaybooks(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateRun(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
createRun := func() *client.PlaybookRun {
|
||||
@@ -977,8 +970,7 @@ func TestUpdateRun(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateRunTaskActions(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("task actions mutation create and update", func(t *testing.T) {
|
||||
@@ -1071,8 +1063,7 @@ func TestUpdateRunTaskActions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBadGraphQLRequest(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
testRunsQuery := `
|
||||
|
||||
@@ -22,8 +22,7 @@ import (
|
||||
)
|
||||
|
||||
func TestPlaybooks(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
e.CreateBasicServer()
|
||||
|
||||
@@ -267,8 +266,7 @@ func TestPlaybooks(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateInvalidPlaybook(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
e.CreateBasicServer()
|
||||
|
||||
@@ -369,8 +367,7 @@ func TestCreateInvalidPlaybook(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybooksRetrieval(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("get playbook", func(t *testing.T) {
|
||||
@@ -387,8 +384,7 @@ func TestPlaybooksRetrieval(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybookUpdate(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("update playbook properties", func(t *testing.T) {
|
||||
@@ -521,8 +517,7 @@ func TestPlaybookUpdate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybookUpdateCrossTeam(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("update playbook properties not in team public playbook", func(t *testing.T) {
|
||||
@@ -552,8 +547,7 @@ func TestPlaybookUpdateCrossTeam(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybooksSort(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
e.CreateBasicServer()
|
||||
e.SetE20Licence()
|
||||
@@ -795,8 +789,7 @@ func TestPlaybooksSort(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybooksPaging(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
e.CreateBasicServer()
|
||||
e.SetE20Licence()
|
||||
@@ -935,8 +928,7 @@ func getPlaybookIDsList(playbooks []client.Playbook) []string {
|
||||
}
|
||||
|
||||
func TestPlaybooksPermissions(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("test no permissions to create", func(t *testing.T) {
|
||||
@@ -1148,8 +1140,7 @@ func TestPlaybooksPermissions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybooksConversions(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("public to private conversion", func(t *testing.T) {
|
||||
@@ -1208,8 +1199,7 @@ func TestPlaybooksConversions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybooksImportExport(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
e.CreateBasicServer()
|
||||
e.CreateBasicPublicPlaybook()
|
||||
@@ -1237,8 +1227,7 @@ func TestPlaybooksImportExport(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybooksDuplicate(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
e.CreateBasicServer()
|
||||
e.SetE20Licence()
|
||||
@@ -1259,8 +1248,7 @@ func TestPlaybooksDuplicate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddPostToTimeline(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
dialogRequest := model.SubmitDialogRequest{
|
||||
@@ -1307,8 +1295,7 @@ func TestAddPostToTimeline(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybookStats(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateClients()
|
||||
e.CreateBasicServer()
|
||||
e.SetE20Licence()
|
||||
@@ -1343,8 +1330,7 @@ func TestPlaybookStats(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybookGetAutoFollows(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
p1ID, err := e.PlaybooksAdminClient.Playbooks.Create(context.Background(), client.PlaybookCreateOptions{
|
||||
@@ -1450,8 +1436,7 @@ func TestPlaybookGetAutoFollows(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybookChecklistCleanup(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("update playbook", func(t *testing.T) {
|
||||
|
||||
@@ -19,8 +19,7 @@ import (
|
||||
)
|
||||
|
||||
func TestRunCreation(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
incompletePlaybookID, err := e.PlaybooksAdminClient.Playbooks.Create(context.Background(), client.PlaybookCreateOptions{
|
||||
@@ -314,8 +313,7 @@ func TestRunCreation(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateRunInExistingChannel(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
// create playbook
|
||||
@@ -410,8 +408,7 @@ func TestCreateRunInExistingChannel(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateInvalidRuns(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("fails if description is longer than 4096", func(t *testing.T) {
|
||||
@@ -428,8 +425,7 @@ func TestCreateInvalidRuns(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRunRetrieval(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("by channel id", func(t *testing.T) {
|
||||
@@ -510,8 +506,7 @@ func TestRunRetrieval(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRunPostStatusUpdate(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("post an update", func(t *testing.T) {
|
||||
@@ -571,8 +566,7 @@ func TestRunPostStatusUpdate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestChecklistManagement(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
createNewRunWithNoChecklists := func(t *testing.T) *client.PlaybookRun {
|
||||
@@ -1188,8 +1182,7 @@ func TestChecklistManagement(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestChecklisFailTooLarge(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("checklist creation - failure: too large checklist", func(t *testing.T) {
|
||||
@@ -1213,8 +1206,7 @@ func TestChecklisFailTooLarge(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRunGetStatusUpdates(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("public - get no updates", func(t *testing.T) {
|
||||
@@ -1343,8 +1335,7 @@ func TestRunGetStatusUpdates(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRequestUpdate(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("private - no viewer access ", func(t *testing.T) {
|
||||
@@ -1437,8 +1428,7 @@ func TestRequestUpdate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestReminderReset(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("reminder reset - timeline event created", func(t *testing.T) {
|
||||
@@ -1485,8 +1475,7 @@ func TestReminderReset(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestChecklisItem_SetAssignee(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
addSimpleChecklistToTun := func(t *testing.T, runID string) *client.PlaybookRun {
|
||||
@@ -1597,8 +1586,7 @@ func TestChecklisItem_SetAssignee(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestChecklisItem_SetCommand(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
run, err := e.PlaybooksClient.PlaybookRuns.Create(context.Background(), client.PlaybookRunCreateOptions{
|
||||
@@ -1699,8 +1687,7 @@ func TestChecklisItem_SetCommand(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetOwners(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
ownerFromUser := func(u *model.User) client.OwnerInfo {
|
||||
|
||||
@@ -14,8 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSettings(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("get settings", func(t *testing.T) {
|
||||
|
||||
@@ -16,8 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGetSiteStats(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("get sites stats", func(t *testing.T) {
|
||||
@@ -50,8 +49,7 @@ func TestGetSiteStats(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPlaybookKeyMetricsStats(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("3 runs with published metrics, 2 runs without publishing", func(t *testing.T) {
|
||||
|
||||
@@ -11,8 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCreateEvent(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
|
||||
t.Run("create an event with bad type fails", func(t *testing.T) {
|
||||
|
||||
@@ -97,7 +97,7 @@ func getEnvWithDefault(name, defaultValue string) string {
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
func Setup(t *testing.T) (*TestEnvironment, func()) {
|
||||
func Setup(t *testing.T) *TestEnvironment {
|
||||
// Ignore any locally defined SiteURL as we intend to host our own.
|
||||
os.Unsetenv("MM_SERVICESETTINGS_SITEURL")
|
||||
os.Unsetenv("MM_SERVICESETTINGS_LISTENADDRESS")
|
||||
@@ -126,11 +126,6 @@ func Setup(t *testing.T) (*TestEnvironment, func()) {
|
||||
config.LogSettings.EnableFile = model.NewBool(false)
|
||||
config.LogSettings.ConsoleLevel = model.NewString("INFO")
|
||||
|
||||
// disable Boards through the feature flag
|
||||
boardsProductEnvValue := os.Getenv("MM_FEATUREFLAGS_BoardsProduct")
|
||||
os.Unsetenv("MM_FEATUREFLAGS_BoardsProduct")
|
||||
config.FeatureFlags.BoardsProduct = false
|
||||
|
||||
// override config with e2etest.config.json if it exists
|
||||
textConfig, err := os.ReadFile("./e2etest.config.json")
|
||||
if err == nil {
|
||||
@@ -169,10 +164,6 @@ func Setup(t *testing.T) (*TestEnvironment, func()) {
|
||||
|
||||
ap := sapp.New(sapp.ServerConnector(server.Channels()))
|
||||
|
||||
teardown := func() {
|
||||
os.Setenv("MM_FEATUREFLAGS_BoardsProduct", boardsProductEnvValue)
|
||||
}
|
||||
|
||||
return &TestEnvironment{
|
||||
T: t,
|
||||
Srv: server,
|
||||
@@ -184,7 +175,7 @@ func Setup(t *testing.T) (*TestEnvironment, func()) {
|
||||
},
|
||||
},
|
||||
logger: testLogger,
|
||||
}, teardown
|
||||
}
|
||||
}
|
||||
|
||||
func (e *TestEnvironment) CreateClients() {
|
||||
@@ -478,8 +469,7 @@ func (e *TestEnvironment) CreateBasic() {
|
||||
|
||||
// TestTestFramework If this is failing you know the break is not exclusively in your test.
|
||||
func TestTestFramework(t *testing.T) {
|
||||
e, teardown := Setup(t)
|
||||
defer teardown()
|
||||
e := Setup(t)
|
||||
e.CreateBasic()
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user