[MM-60648] Don't start server until all routes are registered (#28291)

Этот коммит содержится в:
Ben Schumacher
2024-09-26 13:57:48 +02:00
коммит произвёл GitHub
родитель 20ed58906a
Коммит 3428cd15b6
3 изменённых файлов: 9 добавлений и 14 удалений

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

@@ -15,7 +15,6 @@ import (
"github.com/mattermost/mattermost/server/public/model"
"github.com/mattermost/mattermost/server/public/shared/mlog"
"github.com/mattermost/mattermost/server/v8/channels/api4"
"github.com/mattermost/mattermost/server/v8/channels/app"
"github.com/mattermost/mattermost/server/v8/channels/app/slashcommands"
"github.com/mattermost/mattermost/server/v8/channels/store"
@@ -34,12 +33,7 @@ type TestEnvironment struct {
Request *http.Request
}
// Init adds manualtest endpoint to the API.
func Init(api4 *api4.API) {
api4.BaseRoutes.Root.Handle("/manualtest", api4.APIHandler(manualTest)).Methods(http.MethodGet)
}
func manualTest(c *web.Context, w http.ResponseWriter, r *http.Request) {
func ManualTest(c *web.Context, w http.ResponseWriter, r *http.Request) {
// Let the world know
c.Logger.Info("Setting up for manual test...")