MM-10417 Improve HTTPService for use in image proxy (#9966)
* Replaced httpservice with proper http.Client * Added HTTPService.MakeTransport * Expose timeouts used by HTTPServiceImpl * Add additional documentation to HTTPService * Remove MockedHTTPService * Fix missing license
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f42c00ee53
Коммит
749a3e7538
@@ -6,7 +6,6 @@ package app
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
@@ -16,7 +15,6 @@ import (
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
"github.com/mattermost/mattermost-server/utils/testutils"
|
||||
)
|
||||
|
||||
type TestHelper struct {
|
||||
@@ -32,8 +30,6 @@ type TestHelper struct {
|
||||
|
||||
tempConfigPath string
|
||||
tempWorkspace string
|
||||
|
||||
MockedHTTPService *testutils.MockedHTTPService
|
||||
}
|
||||
|
||||
func setupTestHelper(enterprise bool) *TestHelper {
|
||||
@@ -133,13 +129,6 @@ func (me *TestHelper) InitBasic() *TestHelper {
|
||||
return me
|
||||
}
|
||||
|
||||
func (me *TestHelper) MockHTTPService(handler http.Handler) *TestHelper {
|
||||
me.MockedHTTPService = testutils.MakeMockedHTTPService(handler)
|
||||
me.App.HTTPService = me.MockedHTTPService
|
||||
|
||||
return me
|
||||
}
|
||||
|
||||
func (me *TestHelper) MakeEmail() string {
|
||||
return "success_" + model.NewId() + "@simulator.amazonses.com"
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user