fix(tests): make user_groups integration tests distro-aware#6889
fix(tests): make user_groups integration tests distro-aware#6889mmummigatti wants to merge 1 commit into
Conversation
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?
| if IS_UBUNTU and CURRENT_RELEASE > NOBLE | ||
| else [] | ||
| ) | ||
|
|
There was a problem hiding this comment.
These blank lines were added to satisfy tox formatting requirements.
I've updated the commit message to document this.
| class_client.execute("passwd -d foobar") | ||
| class_client.instance.clean() | ||
| class_client.restart() | ||
|
|
There was a problem hiding this comment.
These blank lines were added to satisfy tox formatting requirements.
I've updated the commit message to document this.
831efb8 to
cc3f091
Compare
cc3f091 to
c2f7817
Compare
| IS_UBUNTU, | ||
| JAMMY, | ||
| NOBLE, | ||
|
|
There was a problem hiding this comment.
If this is for tox formatting, please add a comment to that effect in the commit log.
|
|
||
| verify_clean_boot( | ||
| class_client, | ||
| ignore_warnings=True, # ignore warnings about existing groups |
There was a problem hiding this comment.
why remove this comment? Its not related to the change.
| require_warnings=warnings, | ||
| ) | ||
|
|
||
| ) |
There was a problem hiding this comment.
I think this is simply whitespace issues. There should be no changes here. Can you double check?
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
c2f7817 to
40758ef
Compare
holmanb
left a comment
There was a problem hiding this comment.
The concept is good, but this isn't ready for review. Please don't introduce arbitrary whitespace changes in PRs.
| if IS_UBUNTU and CURRENT_RELEASE > NOBLE | ||
| else [] | ||
| ) | ||
|
|
| class_client.execute("passwd -d foobar") | ||
| class_client.instance.clean() | ||
| class_client.restart() | ||
|
|
@holmanb Medha told me offline that those new lines were required to satisfy tox formatting. @mmummigatti if my understanding is correct, please add a comment to that effect in the commit log. |
40758ef to
f171b60
Compare
Github Actions runs format checks on every PR push. This justification doesn't make sense. Why would a PR that changes this file suddenly require other whitespace changes in just this file? |
If you do not want to have the whitespace changes, please say so. Running tox -e do_format is a standard procedure for other PRs I have submitted. Tox only checks for formatting changes in files we change. This has happend to me also in the past. @mmummigatti please revert the whitespace changes and also remove the comment in the description. |
f171b60 to
fd0ee00
Compare
Reverted whitespace-only changes. |
| @@ -178,7 +182,6 @@ | |||
There was a problem hiding this comment.
I do not understand why these are part of the diff. There should be no changes on these lines if we disregard tox formating issues. Please double check.
There was a problem hiding this comment.
Fixed - removed the unnecessary whitespace changes. The current diff now only contains the functional skipif decorators.
There was a problem hiding this comment.
Did you forget to force push? I do not see any chnages.
https://docs.cloud-init.io/en/23.4/development/#pull-request-checklist Does this instruction not apply to functional tests? I do not see gitlab actions ran any pylint/tox checks here. So its very confusing for contributors. |
What are you trying to say?
I don't believe that this claim is accurate.
Please provide a reproducer. I have not experienced that and couldn't reproduce it here.
You didn't see it because Github Actions runs are gated on maintainer approval for first-time contributors. |
The tone of your comment impled medha left those whitespaces accidentally and did not really intentionally add them to satisfy tox. I found that quite frankly hurtful. Is there any reason to believe she was lying? |
Let's keep this on topic, please. I have never seen [1] |
2d4142a to
6503a0e
Compare
|
Is there anything left to do here? |
|
@mmummigatti Thank you for dropping the whitespace changes. I think that the CI test failures have been fixed upstream. Please merge the latest version of the @mmummigatti @ani-sinha If you happen to figure out what caused the unexpected whitespace changes, I would still appreciate understanding the root cause. Otherwise I will assume that the issue has resolved itself. |
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.