Adjust CopyRecursiveUnitsTestCase to use recursive_conservative #159
Conversation
Tested against 2.18.1b1 installation RHEL7.6. @dralley, and @goosemania, please confirm this is the expected behaviour. |
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.
Looks good I think
@@ -199,9 +201,11 @@ def setUpClass(cls): | |||
def test_recursive(self): | |||
"""Test recursive copy for a repository with rich/weak dependencies. | |||
|
|||
In order to copy all dependencies rich and weak ones, the flag | |||
``recurisve_conservative`` has to be set as True. |
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.
@dralley , @kersommoura , I don't think that's right.
If rich dependencies are resolved only for conservative case, I think it's a bug in solver
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.
@goosemania, thanks.
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.
@kersommoura Could you add the "True, False" test case here? I plan to look into this bug this afternoon hopefully.
edit: ah, didn't notice you're on PTO
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.
You can attach this issue in the description https://pulp.plan.io/issues/4375
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 fixed the issue here: pulp/pulp_rpm#1261
These tests pass with my new PR. Here's a diff which tests the recursive flag, alone.
--- a/pulp_2_tests/tests/rpm/api_v2/test_rich_weak_dependencies.py
+++ b/pulp_2_tests/tests/rpm/api_v2/test_rich_weak_dependencies.py
@@ -201,8 +201,22 @@ class CopyRecursiveUnitsTestCase(unittest.TestCase):
def test_recursive(self):
"""Test recursive copy for a repository with rich/weak dependencies.
- In order to copy all dependencies rich and weak ones, the flag
- ``recurisve_conservative`` has to be set as True.
+ See :meth:`do_test`."
+ """
+ repo = self.do_test(True, False)
+ dst_unit_ids = [
+ unit['metadata']['name'] for unit in
+ search_units(self.cfg, repo, {'type_ids': ['rpm']})
+ ]
+ self.assertEqual(
+ len(dst_unit_ids),
+ RPM2_RICH_WEAK_DATA['total_installed_packages'],
+ dst_unit_ids
+ )
+
+ def test_recursive_conservative(self):
+ """Test recursive copy for a repository with rich/weak dependencies.
+
See :meth:`do_test`."
"""
repo = self.do_test(True, True)
@dralley, thanks. I applied the patch. |
cfcffee
to
58b1a0b
Compare
Pulp 2.18.1 introduced a new flag `recursive_conservative`. Adjust the test case CopyRecursiveUnitsTestCase to use this new flag. `recursive_conservative` is set to False by default. See: https://pulp.plan.io/issues/4152 See: https://pulp.plan.io/issues/4269 See: https://pulp.plan.io/issues/4375
58b1a0b
to
b775b89
Compare
Tested against |
Tested against |
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.
Reviewed against RHEL7.6 FIPS and non-FIPS configured Pulp 2.18.1b1 with 4375 merged and 2.19master2
All linting and testing passed, with the expected failure outside the scope of this PR.
Pulp 2.18.1 introduced a new flag
recursive_conservative
. Adjust thetest case CopyRecursiveUnitsTestCase to use this new flag.
recursive_conservative
is set to False by default.See: https://pulp.plan.io/issues/4152
See: https://pulp.plan.io/issues/4269
See: https://pulp.plan.io/issues/4375