-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensuring that each ExpectedMetric.Type is unique in IntegrationMetadata #669
Conversation
Renaming TestAll in common_test.go to TestMetadataValidation
@@ -0,0 +1,117 @@ | |||
public_url: "https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/activemq" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need such a large test file for this? And does it need real-world data? Should we pare it down to a few entries with generic names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably doesn't need real world data, but the whole file is validated at once so it has to pass all validations present in IntegrationMetadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in: a3b3e13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this is no longer real world data, but do we need a file this large to test the validation? Wouldn't it be enough to have 2 (maybe 3) entries?
That said, it does seem to be consistent with the other tests, which also have overgrown test inputs, so maybe we can defer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should defer, I initially wanted to trim the test inputs but thought it would be better for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in: f9abb2d
…ype' into avilevy-unique-expected-metric-type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add validation to ensure
ExpectedMetric.Type
is unique inIntegrationMetadata
and create appropriate tests.Rename
TestAll
incommon_test.go
toTestMetadataValidation
http://b/235595896