Add test for documented fields check for metricsets without a http input#17334
Merged
narph merged 6 commits intoelastic:masterfrom Apr 2, 2020
Merged
Add test for documented fields check for metricsets without a http input#17334narph merged 6 commits intoelastic:masterfrom
narph merged 6 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/integrations (Team:Integrations) |
exekias
reviewed
Mar 31, 2020
metricbeat/mb/testing/testdata.go
Outdated
Comment on lines
+364
to
+369
| // should cover scenarios as azure.compute_vm_scaleset.*.* | ||
| key = strings.Join(splits[0:pos], ".") + ".*.*" | ||
| if _, ok := knownKeys[key]; ok { | ||
| found = true | ||
| break | ||
| } |
Contributor
There was a problem hiding this comment.
this should not be done in all values of pos, .*.* should only replace the last 2 splits. I think this code can go outside this loop
exekias
reviewed
Mar 31, 2020
| continue | ||
| } | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
WDYT about adding unit tests for this function? I see it has started to grow and I foresee we will keep updating it for a while
Contributor
Author
There was a problem hiding this comment.
well spotted, added a test in testdata_test.go
exekias
approved these changes
Mar 31, 2020
narph
added a commit
to narph/beats
that referenced
this pull request
Apr 2, 2020
…put (elastic#17334) * add test for documented fields * changelog * work on test * add test for testdata * fmt update (cherry picked from commit e545836)
6 tasks
narph
added a commit
to narph/beats
that referenced
this pull request
Apr 2, 2020
…put (elastic#17334) * add test for documented fields * changelog * work on test * add test for testdata * fmt update (cherry picked from commit e545836)
6 tasks
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
…k for metricsets without a http input (elastic#17438) * Add test for documented fields check for metricsets without a http input (elastic#17334) * add test for documented fields * changelog * work on test * add test for testdata * fmt update (cherry picked from commit 072f28e) * update changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a test to check that the metricset fields are documented based on the events generated in the integration tests.
Why is it important?
This is a step in the requirements for moving modules/metricsets to GA.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Add
mbtest.TestMetricsetFieldsDocumentedto the integration testRelated issues