-
Notifications
You must be signed in to change notification settings - Fork 50
fix: Fix file workflow test for container environments #489
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
base: master
Are you sure you want to change the base?
Conversation
5cf8c72
to
9192c46
Compare
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'm not sure it is a good idea to have a test do wildly different things when running on a host/container. Unless we test it elsewhere already, I'd drop the code changing hostnames and only go with the modified archive.
2d5ca03
to
5e646a5
Compare
I kept the original test as was before (I just dropped unnecessary sleep from the test, see the reason in PR description) and I added a new test |
5e646a5
to
371884c
Compare
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.
If the whole task of this new test is to verify that modified archive gets reflected in Inventory, it 1/ feels like a test Inventory should have, not insights-client, and 2/ we already do that in test_tags.py
, just for a different files.
Also, this patch now doesn't address the underlying problem of test_file_workflow_archive_update_host_infofailing because it is calling
hostnamectl set-hostname` which does not work in containers.
371884c
to
86951b4
Compare
86951b4
to
c794413
Compare
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.
All things considered, LGTM. I'm not too happy insights-client does this functionality through the Core, and it might be better to test this through the Core collection, but since it also is a question of integration, we might as well do it.
* Card ID: CCT-994 Rename remove_files_from_archive() to modify_archive(), which adds support for adding files in addition to removing them.
* Card ID: CCT-994 The test for updating info in the archive was failing in containers, which are not in charge of their own hostnames. This commit resolves the test failures by simulating hostname updates through archive file modification.
c794413
to
91dbfc1
Compare
The test for updating info in the archive was failing in containers, which are not in charge of their own hostnames. This commit resolves the test failures by simulating hostname updates through archive file modification.
This pull request should be also backported to following maintenance branches:
el9
(all of RHEL 9)el8
(all of RHEL 8)