fix(tests): make user_groups integration tests distro-aware#6889
Open
mmummigatti wants to merge 1 commit into
Open
fix(tests): make user_groups integration tests distro-aware#6889mmummigatti wants to merge 1 commit into
mmummigatti wants to merge 1 commit into
Conversation
ani-sinha
suggested changes
May 20, 2026
Contributor
ani-sinha
left a comment
There was a problem hiding this comment.
Can you please check that tests pass with both RHEL and Ubuntu images?
| warnings = ( | ||
| [NEW_USER_EMPTY_PASSWD_WARNING.format(username="nopassworduser")] | ||
| if CURRENT_RELEASE > NOBLE | ||
| if IS_UBUNTU and CURRENT_RELEASE > NOBLE |
Contributor
There was a problem hiding this comment.
Seems this would not be needed since you are skipping the test for non-Ubuntu case anyway. Can you try and removing this and checking if it worked on Fedora/RHEL.
| ) | ||
|
|
||
|
|
||
| # @pytest.mark.user_data(USER_DATA) |
Contributor
There was a problem hiding this comment.
remove these commented code.
ani-sinha
reviewed
May 26, 2026
831efb8 to
cc3f091
Compare
ani-sinha
suggested changes
May 29, 2026
| require_warnings=warnings, | ||
| ) | ||
|
|
||
| verify_clean_boot( |
Contributor
There was a problem hiding this comment.
This change does not make sense.
cc3f091 to
c2f7817
Compare
The integration tests for users_groups module had Ubuntu-specific
assumptions that prevented them from running on RHEL-family systems.
Changes:
- Add skipif decorators to Ubuntu-specific warning tests
- Remove redundant IS_UBUNTU checks inside skipif-decorated tests
- Restore test_sudoers_includedir decorators with distro-aware skipif
logic: 'IS_UBUNTU and CURRENT_RELEASE < JAMMY' allows test to run
on RHEL and modern Ubuntu while skipping old Ubuntu releases
- Add JAMMY import needed for the distro-aware skipif condition
ani-sinha
suggested changes
May 29, 2026
| IS_UBUNTU, | ||
| JAMMY, | ||
| NOBLE, | ||
|
|
|
|
||
| verify_clean_boot( | ||
| class_client, | ||
| ignore_warnings=True, # ignore warnings about existing groups |
Contributor
There was a problem hiding this comment.
why remove this comment? Its not related to the change.
| require_warnings=warnings, | ||
| ) | ||
|
|
||
| ) |
Contributor
There was a problem hiding this comment.
I think this is simply whitespace issues. There should be no changes here. Can you double check?
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.
The integration tests for users_groups module had Ubuntu-specific
assumptions that prevented them from running on RHEL-family systems.
Changes:
test_nopassword_unlock_warnings) since warning formats differ across distros
'IS_UBUNTU and CURRENT_RELEASE < JAMMY' allows the test to run on RHEL
and modern Ubuntu while skipping only on old Ubuntu releases lacking
required sudo version
These changes ensure tests either:
This allows the test suite to pass on both Ubuntu and RHEL-family systems.