-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Refactor tests in metricbeat in kubernetes module #32706
Refactor tests in metricbeat in kubernetes module #32706
Conversation
This pull request does not have a backport label.
|
"cpu.usage.core.ns": 43959424, | ||
"cpu.usage.nanocores": 11263994, | ||
|
||
"logs.available.bytes": int64(98727014400), | ||
"logs.capacity.bytes": int64(101258067968), | ||
"logs.used.bytes": 28672, |
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.
So you removed them as they are unrleayed with cpu/memory test? I think is better like that
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 was moved to basicTests
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 didn't removed them entirely. I just moved into a function basicTests
since they were not related to cpu/memory and in case we wanted to add more tests in the future. pod_test.go
is a good example of why it makes sense to move those fields in a separate method
Namespace string | ||
PodName string | ||
ContainerName string | ||
AnotherContainerName string |
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.
AnotherContainerName
is not actually needed for container tests, no?
"cpu.usage.core.ns": 43959424, | ||
"cpu.usage.nanocores": 11263994, | ||
|
||
"logs.available.bytes": int64(98727014400), | ||
"logs.capacity.bytes": int64(101258067968), | ||
"logs.used.bytes": 28672, |
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 was moved to basicTests
Co-authored-by: Andrew Gizas <[email protected]>
Co-authored-by: Andrew Gizas <[email protected]>
Co-authored-by: Andrew Gizas <[email protected]>
* refactoring some tests to avoid duplication Co-authored-by: Andrew Gizas <[email protected]>
What does this PR do?
Refactor tests in metricbeat under the kubernetes module.
Why is it important?
Simplify tests and avoid duplication
Checklist
Author's Checklist