Skip to content

Commit

Permalink
Fix metadata.service.* fields requirements in json schema (#4142)
Browse files Browse the repository at this point in the history
Validations on metadata.service.* fields were not run correctly, changing the schema to properly run validations and
adding package tests for verification.

fixes #4141
  • Loading branch information
simitt authored Sep 14, 2020
1 parent 03e01c9 commit 79ec0ed
Show file tree
Hide file tree
Showing 12 changed files with 890 additions and 455 deletions.
2 changes: 1 addition & 1 deletion beater/api/profile/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestHandler(t *testing.T) {
part{
name: "metadata",
contentType: "application/json",
body: strings.NewReader(`{"service":{"name":"foo","agent":{}}}`),
body: strings.NewReader(`{"service":{"name":"foo","agent":{"name":"go","version":"1.0"}}}`),
},
},
body: prettyJSON(map[string]interface{}{"accepted": 2}),
Expand Down
Loading

0 comments on commit 79ec0ed

Please sign in to comment.