pulp / Pulp-2-Tests

:warning: ⛔️ Pulp2 is EOL as of November 30 2022, for more info visit this link https://pulpproject.org/2022/09/19/pulp-2-eol/. ⛔️ Functional tests for Pulp 2.
https://pulp-2-tests.readthedocs.io/
1 stars 11 forks source link

Adding additional modular copy permutations for libsolv regression #203

Closed bherrin3 closed 5 years ago

bherrin3 commented 5 years ago

Note

Dev PR 4962 is still outstanding. Therefore, this test will be skipped until then.

For development and early review, this PR/branch is posted.

Problem

With the updated libsolv, the dependency solving on complex repositories was resulting in a regression of too many modules, modular RPMs, and ursine RPMs being copied.

Solution

This commit will do the following:

Additional Changes

OUTSTANDING FIXTURE UPDATE

The fixture this test is relying on was MANUALLY updated for this test:

How to Execute

To get the full effect and benefit of subTest, this test should be ran with unittest and not pytest.

Run it all on a fixed dev branch

The full iteration suite is 371s.

Code to Comment Out for Dev Run

To run with the extra modules on a dev branch, please comment out the following:

            if not selectors.bug_is_fixed(4962, cls.cfg.pulp_version):
                raise unittest.SkipTest('https://pulp.plan.io/issues/4962')

Execution Command

From the Pulp-2-Test root directory:

time python -m unittest pulp_2_tests.tests.rpm.api_v2.test_modularity.CheckIsModularFlagTestCase -vvv

Example Additional Verbose Output

The output of the specific failure does have to be mentally extrapolated a bit, but is available.

For example, the check=(11,2) failed, which from the output of module in the assert we can see that is 'total_available_units': 2,.

Therefore, the total units copied in duck was expected to be the module + duck RPM, but we got 11 units copied (bad).

======================================================================
FAIL: test_copy_modulemd_recursive_nonconservative_old_rpm (pulp_2_tests.tests.rpm.api_v2.test_modularity.CopyModulesTestCase) (check=(11, 2), modules='duck')
Test modular copy using override_config and old RPMs.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/herring/git/Pulp-2-Tests/pulp_2_tests/tests/rpm/api_v2/test_modularity.py", line 519, in check_module_rpm_total_units
    self.assertEqual(check[0], check[1], module)
AssertionError: 11 != 2 : {'name': 'duck', 'stream': '4', 'new_stream': '4', 'rpm_count': 1, 'total_available_units': 2, 'module_defaults': 1, 'feed': 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-test-modularity/', 'old': 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/duck-0.7-1.noarch.rpm'}

----------------------------------------------------------------------
Ran 5 tests in 118.202s

FAILED (failures=15)

References

closes #4955

bherrin3 commented 5 years ago

@kersommoura it looks like this content is no longer targeted at this Y-release, but is still targeted for a very soon Z-release.

I would suggest that I can add back the skip and we merge this and the fixture, as is, until the feature is fixed.

The examples and permutations are still valid additions. This would also ensure this code doesn't get stuck in a hard rebase since modularity is still in active development.

What do you say?