test: fix integration test_combined for rhel#6791
test: fix integration test_combined for rhel#6791xiachen-rh wants to merge 1 commit intocanonical:mainfrom
Conversation
fa8b7cb to
1d8230e
Compare
holmanb
left a comment
There was a problem hiding this comment.
Thanks for this @xiachen-rh. I left a couple of nitpick comments but otherwise this looks good to me.
| expected_locale_gen = ["en_GB.UTF-8", "en_US.UTF-8"] | ||
| verify_ordered_items_in_text(expected_locales, locale_a) | ||
| verify_ordered_items_in_text(expected_locale_gen, locale_gen) | ||
| if not IS_RHEL: |
There was a problem hiding this comment.
Could we reduce the diff size by exiting early when IS_RHEL is true?
There was a problem hiding this comment.
Yeah, I will change the code to 'exiting early', thanks for your comments.
There was a problem hiding this comment.
I have updated the PR.
| "ubuntu": USER_DATA_UBUNTU, | ||
| "rhel": USER_DATA_RHEL, | ||
| "centos": USER_DATA_RHEL, | ||
| }.get(CURRENT_RELEASE.os, USER_DATA_UBUNTU) |
There was a problem hiding this comment.
This would cause the Ubuntu userdata to be silently passed if this test suite is later updated to support other distros with this data structure not updated.
It would make it easier for developers to update this datastructure by failing loudly instead.
There was a problem hiding this comment.
Oh, I thought this would have minimal impact on other distros, since I’m not sure what kind of USER_DATA they use. Before and after this change, they would still use the same USER_DATA.
Do you mean it’s better not to set USER_DATA_UBUNTU as the default value?
There was a problem hiding this comment.
Right, I'd rather not assume the ubuntu config for new distros.
I think raising a pytest failure exception (or even just a stack trace) when an unsupported distro is passed would make it easier to bring up support for additional distros.
There was a problem hiding this comment.
Got it, I will update the PR.
There was a problem hiding this comment.
I resent the PR, could you please help to review it when you are available?
1d8230e to
92f7fb1
Compare
integraton tests: add RHEL distro support - add default usename for RHEL distro and platform specific. - add optional LAUNCH_USERNAME in integration_settings to override default username per run. - use distro-specific USER_DATA in test_combined and adjust rsyslog and locale config so they work on RHEL, and removing the modules which not support RHEL. - skip the tests in test_combined which do not surport RHEL. Signed-off-by: Amy Chen <xiachen@redhat.com>
92f7fb1 to
556c409
Compare
To Fix issue #6790 step by step, I submit the first PR,
integraton tests: add RHEL distro support
Test Steps
I have run tests with RHEL on AWS and Azure, no problem.
Merge type