[MM-27836] Fix possible panic when patching config (#15262)
* Fix possible panic when updating/patching config * Remove un-needed check
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
095e5d788b
Коммит
58c6eabf95
@@ -550,6 +550,12 @@ func TestPatchConfig(t *testing.T) {
|
||||
cfg, resp = th.SystemAdminClient.GetConfig()
|
||||
CheckNoError(t, resp)
|
||||
require.Equal(t, nonEmptyURL, *cfg.ServiceSettings.SiteURL)
|
||||
|
||||
// Check that sending an empty config returns an error.
|
||||
_, resp = th.SystemAdminClient.PatchConfig(&model.Config{})
|
||||
require.NotNil(t, resp.Error)
|
||||
CheckBadRequestStatus(t, resp)
|
||||
assert.Equal(t, "api.config.update_config.clear_siteurl.app_error", resp.Error.Id)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user