* Update github.com/mholt/archives * Update github.com/spf13/viper * make batch migration worker tests less flaky --------- Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
891a006890
Коммит
9dd2c6f54f
@@ -15,10 +15,23 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils/fileutils"
|
||||
)
|
||||
|
||||
// CollectTWithLogf adds Logf to assert.CollectT to make this pattern possible:
|
||||
//
|
||||
// assert.EventuallyWithT(t, func(c *assert.CollectT) {
|
||||
// mockAPI.AssertExpectations(&testutils.CollectTWithLogf{CollectT: c})
|
||||
// }, 5*time.Second, 100*time.Millisecond)
|
||||
type CollectTWithLogf struct {
|
||||
*assert.CollectT
|
||||
}
|
||||
|
||||
func (*CollectTWithLogf) Logf(string, ...any) {
|
||||
}
|
||||
|
||||
func ReadTestFile(name string) ([]byte, error) {
|
||||
path, _ := fileutils.FindDir("tests")
|
||||
file, err := os.Open(filepath.Join(path, name))
|
||||
|
||||
Ссылка в новой задаче
Block a user