[network] Refactor: split check_linux methods into different class#13109
Merged
Conversation
alopezz
reviewed
Oct 13, 2022
|
|
||
| def check(self, _): | ||
| """ | ||
| _check_linux can be run inside a container and still collects the network metrics from the host |
Contributor
There was a problem hiding this comment.
Outdated docstring (this is no longer _check_linux).
Comment on lines
+22
to
+25
| try: | ||
| import fcntl | ||
| except ImportError: | ||
| fcntl = None |
Comment on lines
+456
to
+457
| @mock.patch('datadog_checks.network.network.Platform.is_bsd', return_value=False) | ||
| @mock.patch('datadog_checks.network.network.Platform.is_linux', return_value=True) |
Contributor
There was a problem hiding this comment.
Would be nice if we could refactor this into a pytest fixture / decorator.
Contributor
Author
There was a problem hiding this comment.
That's a rabbithole I don't want to get into right now
steveny91
pushed a commit
that referenced
this pull request
Oct 27, 2022
…13109) * Split linux check
Contributor
Author
|
This PR introduces a bug in solaris that has been fixed on #13319 |
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.
split of #13102 only extracting the linux check for easier review
Extract check linux into a different class
Rename methods that will remain in the parent class
Noticed that some parts of the linux check have no coverage, working on it on a separate PR #13117