mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-20 00:10:19 -05:00
* 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
22 lines
447 B
Go
22 lines
447 B
Go
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
package plugin_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/mattermost/mattermost-server/testlib"
|
|
)
|
|
|
|
var mainHelper *testlib.MainHelper
|
|
|
|
func TestMain(m *testing.M) {
|
|
var options = testlib.HelperOptions{
|
|
EnableResources: true,
|
|
}
|
|
mainHelper = testlib.NewMainHelperWithOptions(&options)
|
|
defer mainHelper.Close()
|
|
|
|
mainHelper.Main(m)
|
|
}
|