Skip to content

[1.28] Make 1.28 tests work on Fedora 37#3176

Merged
ptoscano merged 14 commits intosubscription-manager-1.28from
mhorky/pytest-updates-1.28
Dec 12, 2022
Merged

[1.28] Make 1.28 tests work on Fedora 37#3176
ptoscano merged 14 commits intosubscription-manager-1.28from
mhorky/pytest-updates-1.28

Conversation

@m-horky
Copy link
Contributor

@m-horky m-horky commented Dec 7, 2022

This is a backport of #3124, #3181, and partial backport of #3156 as well. As the code differs quite a bit, it was not possible to cherry-pick the changes.

@m-horky m-horky force-pushed the mhorky/pytest-updates-1.28 branch 2 times, most recently from 4b166b4 to 9821ea1 Compare December 12, 2022 12:18
* Card ID: ENT-5533

Adapted from commit 2e5dd64

It was not possible to backport it completely, as the branches differ
too much:

- Tests have been reorganized and some directories have been renamed.
- rhsmlib tests have been split into service and D-Bus tests
- 1.28 branch does not have the 'sender' argument in D-Bus methods, so
  we do not need to mock it in here.
* Card ID: ENT-5533

Adapted from commit dff6d71
* Card ID: ENT-5533

Adapted from commit de9730e
* Card ID: ENT-5533

Adapted from commit 2472cfc
* Card ID: ENT-5533

Adapted from commit fec8833
* Card ID: ENT-5533

Adapted from commit eaac363
* Card ID: ENT-5533

Adapted from commit 5e4d77c
* Card ID: ENT-5533

This is partial backport of commit
bae7ce3, which we backported recently
in 23248d9. Because the old tests were
replaced by the new tests in here, we need to backport the tests part
again.
* Card ID: ENT-5350

This is partial backport of commit
60470eb, which we backported recently
in a7c233d. Because old tests were
replaced by the new tests in here, we need to backport the tests part
again.
* Card ID: ENT-5533

Adapted from commit 521cf61
Adapted from commit 24e47e4
The fixture mocks and prepares many injections. While this solution is
kind of like using a flamethrower to make a single piece of popcorn, it
does work and fixes the issue of trying to access '/etc/pki/product/'
directly.
Copy link
Contributor

@ptoscano ptoscano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Lots of changes to go through, however it seems to me everything was covered. A possible followup change could be trying to remove the forking behaviour of pytest, hopefully it should work fine without it now.

The only CI failure is on rhel-8-7 and it's due to infra issues, so let's merge it.

@ptoscano ptoscano merged commit 1887750 into subscription-manager-1.28 Dec 12, 2022
@ptoscano ptoscano deleted the mhorky/pytest-updates-1.28 branch December 12, 2022 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants