@@ -63,13 +63,6 @@ func TestGetConfigWithAccessTag(t *testing.T) {
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
varyByHeader := *&th.App.Config().RateLimitSettings.VaryByHeader // environment perm.
|
||||
supportEmail := *&th.App.Config().SupportSettings.SupportEmail // site perm.
|
||||
defer th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
cfg.RateLimitSettings.VaryByHeader = varyByHeader
|
||||
cfg.SupportSettings.SupportEmail = supportEmail
|
||||
})
|
||||
|
||||
// set some values so that we know they're not blank
|
||||
mockVaryByHeader := model.NewId()
|
||||
mockSupportEmail := model.NewId() + "@mattermost.com"
|
||||
@@ -353,7 +346,7 @@ func TestUpdateConfigMessageExportSpecialHandling(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
|
||||
*cfg.MessageExportSettings.EnableExport = true
|
||||
cfg, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
_, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
assert.True(t, *th.App.Config().MessageExportSettings.EnableExport)
|
||||
@@ -364,7 +357,7 @@ func TestUpdateConfigMessageExportSpecialHandling(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
|
||||
*cfg.MessageExportSettings.EnableExport = false
|
||||
cfg, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
_, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
assert.False(t, *th.App.Config().MessageExportSettings.EnableExport)
|
||||
@@ -381,7 +374,7 @@ func TestUpdateConfigMessageExportSpecialHandling(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
|
||||
*cfg.MessageExportSettings.EnableExport = true
|
||||
cfg, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
_, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
assert.True(t, *th.App.Config().MessageExportSettings.EnableExport)
|
||||
@@ -392,7 +385,7 @@ func TestUpdateConfigMessageExportSpecialHandling(t *testing.T) {
|
||||
CheckNoError(t, resp)
|
||||
|
||||
*cfg.MessageExportSettings.EnableExport = false
|
||||
cfg, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
_, resp = th.SystemAdminClient.UpdateConfig(cfg)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
assert.False(t, *th.App.Config().MessageExportSettings.EnableExport)
|
||||
@@ -745,7 +738,7 @@ func TestPatchConfig(t *testing.T) {
|
||||
SiteURL: model.NewString(""),
|
||||
},
|
||||
}
|
||||
updatedConfig, resp = th.SystemAdminClient.PatchConfig(&config)
|
||||
_, resp = th.SystemAdminClient.PatchConfig(&config)
|
||||
CheckBadRequestStatus(t, resp)
|
||||
CheckErrorMessage(t, resp, "api.config.update_config.clear_siteurl.app_error")
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user