Skip to content

Commit

Permalink
server: make i18n test more robust (scottleedavis#212)
Browse files Browse the repository at this point in the history
It breaks on macOS 11.
  • Loading branch information
kemenaran authored Apr 6, 2022
1 parent f45aa27 commit 99be8e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/i18n_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"testing"
"strings"

"github.com/mattermost/mattermost-server/v5/plugin/plugintest"
"github.com/stretchr/testify/mock"
Expand Down Expand Up @@ -49,9 +50,7 @@ func TestTranslationsPreInit(t *testing.T) {
p := &Plugin{}
p.API = api
err = p.TranslationsPreInit()
require.True(t, err.Error() == "unable to read i18n directory: readdirent: invalid argument" ||
err.Error() == "unable to read i18n directory: readdirent: not a directory" ||
err.Error() == "unable to read i18n directory: fdopendir: not a directory")
require.True(t, strings.Contains(err.Error(), "unable to read i18n directory"))

})

Expand Down

0 comments on commit 99be8e4

Please sign in to comment.