summaryrefslogtreecommitdiffstats
path: root/api4/image_test.go
diff options
context:
space:
mode:
authorcpanato <ctadeu@gmail.com>2018-07-12 19:50:16 +0200
committercpanato <ctadeu@gmail.com>2018-07-12 19:50:16 +0200
commitadc56ae78df2a84c14c5e2921ec9cb14817a2474 (patch)
treea66d4646ecc3baef4d365f7148fe3921ab267e15 /api4/image_test.go
parent8cad7070acc537d070edd1029fe0c6ce422ab0ed (diff)
parent2e861c4df4063f325df40861ee045c0136d34f1e (diff)
downloadchat-adc56ae78df2a84c14c5e2921ec9cb14817a2474.tar.gz
chat-adc56ae78df2a84c14c5e2921ec9cb14817a2474.tar.bz2
chat-adc56ae78df2a84c14c5e2921ec9cb14817a2474.zip
Merge remote-tracking branch 'upstream/release-5.1' into release-5.1-daily-merge-20180712
Diffstat (limited to 'api4/image_test.go')
-rw-r--r--api4/image_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/api4/image_test.go b/api4/image_test.go
index aa3619cdd..3b029ac72 100644
--- a/api4/image_test.go
+++ b/api4/image_test.go
@@ -28,6 +28,15 @@ func TestGetImage(t *testing.T) {
require.NoError(t, err)
r.Header.Set(model.HEADER_AUTH, th.Client.AuthType+" "+th.Client.AuthToken)
+ imageProxyType := th.App.Config().ServiceSettings.ImageProxyType
+ imageProxyOptions := th.App.Config().ServiceSettings.ImageProxyOptions
+ imageProxyURL := th.App.Config().ServiceSettings.ImageProxyURL
+ defer func() {
+ th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.ImageProxyType = imageProxyType })
+ th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.ImageProxyOptions = imageProxyOptions })
+ th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.ImageProxyOptions = imageProxyURL })
+ }()
+
th.App.UpdateConfig(func(cfg *model.Config) {
cfg.ServiceSettings.ImageProxyType = nil
})