Fix further test issues when run in container#3189
Merged
Conversation
Because 'get_config_parser()' and 'in_container()' functions were being imported directly, instead of as reference, the mocks that tests perform were not applying to them, causing test suite to fail when run from inside a container. Future-wise it is better to manage mocks on one place, instead of patching the functions whenever they are being imported.
ptoscano
suggested changes
Jan 6, 2023
Contributor
ptoscano
left a comment
There was a problem hiding this comment.
In general it is OK, thanks for the work!
While I agree with the change wrt the IP addresses collection, I think that that bit need a bit more of discussion and testing, especially that tried to handle some kind of "edge cases". Would it be possible to split that commit in its own draft PR, so we can bring the other two commits in?
* Card ID: ENT-5536 Subprocess calls to 'touch' were sometimes failing to update the modification date (race condition, probably?), making the tests fail. When 'os.utime' is used, this is no longer the case and the files are always reported as modified.
6009668 to
68acefc
Compare
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.
These tree commits address issues that were found when the test suite was run in a container.
UPDATE: The hwprobe commit was removed and will be opened individually, as it requires more testing.