MM-16506: conditionally build go.mod for plugins (#11430)

* MM-16506: conditionally build go.mod for plugins

Unless `GO111MODULE=off`, generate a `go.mod` that points at the local copy of `mattermost-server` to ensure plugin tests that compile source code on demand always test with the local copy of mattermost-server.  This also fixes an issue with early adopters of `GO111MODULE=on` on the server failing to find the right version of go-i18n dependencies.

* plugin: enable testlib resource management

* customize fileutils.Find* for testlib
This commit is contained in:
Jesse Hallam
2019-07-05 12:34:49 -03:00
committed by GitHub
parent 11f1accac6
commit 25f3bf4a2b
3 changed files with 68 additions and 5 deletions

View File

@@ -12,7 +12,10 @@ import (
var mainHelper *testlib.MainHelper
func TestMain(m *testing.M) {
mainHelper = testlib.NewMainHelperWithOptions(nil)
var options = testlib.HelperOptions{
EnableResources: true,
}
mainHelper = testlib.NewMainHelperWithOptions(&options)
defer mainHelper.Close()
mainHelper.Main(m)