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
@@ -1093,12 +1093,6 @@ func CheckErrorMessage(tb testing.TB, err error, message string) {
|
||||
require.Equalf(tb, message, appError.Message, "incorrect error message, actual: %s, expected: %s", appError.Id, message)
|
||||
}
|
||||
|
||||
func CheckStartsWith(tb testing.TB, value, prefix, message string) {
|
||||
tb.Helper()
|
||||
|
||||
require.True(tb, strings.HasPrefix(value, prefix), message, value)
|
||||
}
|
||||
|
||||
// Similar to s3.New() but allows initialization of signature v2 or signature v4 client.
|
||||
// If signV2 input is false, function always returns signature v4.
|
||||
//
|
||||
|
||||
Ссылка в новой задаче
Block a user