-
Notifications
You must be signed in to change notification settings - Fork 131
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
More Data added to OHI Inventory #2007
More Data added to OHI Inventory #2007
Conversation
Pull Request Test Coverage Report for Build 13193786760Details
💛 - Coveralls |
2f53613
to
0c44e3b
Compare
if expectedValue, exists := expectedLabelValues[id]; exists { | ||
c.Assert(value, Equals, expectedValue) | ||
} |
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.
Can we add a fail if it doesn't exist?
if expectedValue, exists := expectedLabelValues[id]; exists {
c.Assert(value, Equals, expectedValue)
} else {
c.Fail()
}
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.
Test now fails when label is not found.
if expectedValue, exists := expectedLabelValues[id]; exists { | ||
assert.EqualValues(t, value, expectedValue) | ||
} |
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 would add an assertion to fail if expectedValue doesn't exist
if expectedValue, exists := expectedLabelValues[id]; exists {
assert.EqualValues(t, value, expectedValue)
} else {
t.Fail()
}
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.
Test now fails when label is not found.
if expectedValue, exists := expectedLabelValues[id]; exists { | ||
assert.EqualValues(t, value, expectedValue) | ||
} | ||
} |
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.
Same as above:
if expectedValue, exists := expectedLabelValues[id]; exists {
assert.EqualValues(t, value, expectedValue)
} else {
t.Fail()
}
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.
Test now fails when label is not found.
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 🚀
integrationVersion, integrationName, reportingAgent added custom attributes from infra agent config are added with prefix labels/ labels from ohi config file are added with prefix labels/
8775e7f
to
116b27d
Compare
integrationVersion, integrationName, reportingAgent added to inventory
custom_attributes
from infra agent config are added with prefixlabels/
labels
from ohi config file are added with prefixlabels/