Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2021-06-04 10:32:50 +03:00
коммит произвёл GitHub
родитель d1eeafb29f
Коммит 0e42613aef
6 изменённых файлов: 5 добавлений и 58 удалений

Просмотреть файл

@@ -23,6 +23,4 @@ var RootCmd = &cobra.Command{
func init() {
RootCmd.PersistentFlags().StringP("config", "c", "", "Configuration file to use.")
RootCmd.PersistentFlags().Bool("disableconfigwatch", false, "When set config.json will not be loaded from disk when the file is changed.")
RootCmd.PersistentFlags().Bool("platform", false, "This flag signifies that the user tried to start the command from the platform binary, so we can log a mssage")
RootCmd.PersistentFlags().MarkHidden("platform")
}

Просмотреть файл

@@ -39,8 +39,6 @@ func init() {
func serverCmdF(command *cobra.Command, args []string) error {
disableConfigWatch, _ := command.Flags().GetBool("disableconfigwatch")
usedPlatform, _ := command.Flags().GetBool("platform")
interruptChan := make(chan os.Signal, 1)
if err := utils.TranslationsPreInit(); err != nil {
@@ -58,10 +56,10 @@ func serverCmdF(command *cobra.Command, args []string) error {
}
defer configStore.Close()
return runServer(configStore, usedPlatform, interruptChan)
return runServer(configStore, interruptChan)
}
func runServer(configStore *config.Store, usedPlatform bool, interruptChan chan os.Signal) error {
func runServer(configStore *config.Store, interruptChan chan os.Signal) error {
// Setting the highest traceback level from the code.
// This is done to print goroutines from all threads (see golang.org/issue/13161)
// and also preserve a crash dump for later investigation.
@@ -96,10 +94,6 @@ func runServer(configStore *config.Store, usedPlatform bool, interruptChan chan
}
}()
if usedPlatform {
mlog.Warn("The platform binary has been deprecated, please switch to using the mattermost binary.")
}
a := app.New(app.ServerConnector(server))
api := api4.Init(a, server.Router)

Просмотреть файл

@@ -66,7 +66,7 @@ func TestRunServerSuccess(t *testing.T) {
// Use non-default listening port in case another server instance is already running.
*configStore.Get().ServiceSettings.ListenAddress = UnitTestListeningPort
err := runServer(configStore, false, th.interruptChan)
err := runServer(configStore, th.interruptChan)
require.NoError(t, err)
}
@@ -117,7 +117,7 @@ func TestRunServerSystemdNotification(t *testing.T) {
*configStore.Get().ServiceSettings.ListenAddress = UnitTestListeningPort
// Start and stop the server
err = runServer(configStore, false, th.interruptChan)
err = runServer(configStore, th.interruptChan)
require.NoError(t, err)
// Ensure the notification has been sent on the socket and is correct
@@ -139,6 +139,6 @@ func TestRunServerNoSystemd(t *testing.T) {
// Use non-default listening port in case another server instance is already running.
*configStore.Get().ServiceSettings.ListenAddress = UnitTestListeningPort
err := runServer(configStore, false, th.interruptChan)
err := runServer(configStore, th.interruptChan)
require.NoError(t, err)
}