Glue: Add configuration support to PATCH (#56117)

* feat: add config to tests v0

* feat: add config to UpdateCorrelationCommand

* refactor: repair some tests

* refactor: repair another test

* refactor: repair last test

* refactor: remove possible test

* refactor: add comments

* refactor: add changes from code review

* refactor: implement more detailed patch

* feat: add tests for partial config update

* refactor: make error handling more detailed

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
Laura Benz
2022-10-10 15:36:14 +02:00
committed by GitHub
co-authored by Giordano Ricci
parent 680dfde90d
commit bc9a37ee8d
5 changed files with 152 additions and 28 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ func (s *CorrelationsService) updateHandler(c *models.ReqContext) response.Respo
correlation, err := s.UpdateCorrelation(c.Req.Context(), cmd)
if err != nil {
if errors.Is(err, ErrUpdateCorrelationEmptyParams) {
return response.Error(http.StatusBadRequest, "At least one of label, description is required", err)
return response.Error(http.StatusBadRequest, "At least one of label, description or config is required", err)
}
if errors.Is(err, ErrSourceDataSourceDoesNotExists) {