Channels/api4 testing improvements (#22938)
* api4/post_test: fix missing TearDown * api4/plugin_test: dont test timeout, saving 120s * api4/channel_test: dont try to delete town square * api4/channel_test: check public channel names deterministically * api4/file_test: fix darwin assertions on go files * api4/notify_admin_test: fix expect/actual order * api4/team_test: make TestGetAllTeams deterministic * api4/plugin_test: avoid nested test helpers * api4/post_test: avoid nested test helpers * api4/websocket_test: externalize log buffer * testlib/helper: unset common env * linting issues * simplify TestGetFileHeaders * team_test: leverage ElementsMatch
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dd2b1db420
Коммит
89f2ebc836
@@ -58,6 +58,11 @@ func NewMainHelperWithOptions(options *HelperOptions) *MainHelper {
|
||||
os.Unsetenv("MM_SQLSETTINGS_DATASOURCE")
|
||||
}
|
||||
|
||||
// Unset environment variables commonly set for development that interfere with tests.
|
||||
os.Unsetenv("MM_SERVICESETTINGS_SITEURL")
|
||||
os.Unsetenv("MM_SERVICESETTINGS_LISTENADDRESS")
|
||||
os.Unsetenv("MM_SERVICESETTINGS_ENABLEDEVELOPER")
|
||||
|
||||
var mainHelper MainHelper
|
||||
flag.Parse()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user