Centralize the GetPackagePath (#27004)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e96db725ea
Коммит
cd51dec6e5
@@ -9,9 +9,9 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost/server/v8"
|
||||
"github.com/mattermost/mattermost/server/v8/cmd/mmctl/client"
|
||||
"github.com/mattermost/mattermost/server/v8/cmd/mmctl/printer"
|
||||
"github.com/mattermost/mattermost/server/v8/tests"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/utils"
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
func (s *MmctlE2ETestSuite) TestExportListCmdF() {
|
||||
s.SetupTestHelper()
|
||||
importName := "import_test.zip"
|
||||
importFilePath := filepath.Join(tests.GetPackagePath(), importName)
|
||||
importFilePath := filepath.Join(server.GetPackagePath(), "tests", importName)
|
||||
exportPath, err := filepath.Abs(filepath.Join(*s.th.App.Config().FileSettings.Directory,
|
||||
*s.th.App.Config().ExportSettings.Directory))
|
||||
s.Require().Nil(err)
|
||||
@@ -73,7 +73,7 @@ func (s *MmctlE2ETestSuite) TestExportListCmdF() {
|
||||
func (s *MmctlE2ETestSuite) TestExportDeleteCmdF() {
|
||||
s.SetupTestHelper()
|
||||
importName := "import_test.zip"
|
||||
importFilePath := filepath.Join(tests.GetPackagePath(), importName)
|
||||
importFilePath := filepath.Join(server.GetPackagePath(), "tests", importName)
|
||||
exportPath, err := filepath.Abs(filepath.Join(*s.th.App.Config().FileSettings.Directory,
|
||||
*s.th.App.Config().ExportSettings.Directory))
|
||||
s.Require().Nil(err)
|
||||
@@ -179,7 +179,7 @@ func (s *MmctlE2ETestSuite) TestExportCreateCmdF() {
|
||||
func (s *MmctlE2ETestSuite) TestExportDownloadCmdF() {
|
||||
s.SetupTestHelper()
|
||||
importName := "import_test.zip"
|
||||
importFilePath := filepath.Join(tests.GetPackagePath(), importName)
|
||||
importFilePath := filepath.Join(server.GetPackagePath(), "tests", importName)
|
||||
exportPath, err := filepath.Abs(filepath.Join(*s.th.App.Config().FileSettings.Directory,
|
||||
*s.th.App.Config().ExportSettings.Directory))
|
||||
s.Require().Nil(err)
|
||||
|
||||
Ссылка в новой задаче
Block a user