Skip to content

Commit

Permalink
Fix test to be pulpcore-3.55 compatible
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
gerrod3 committed Jun 18, 2024
1 parent 5b9abff commit 590e07e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pulp_rpm/tests/functional/api/test_distribution_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ def test_dist_tree_copy_as_content(


@pytest.mark.parallel
def test_skip_treeinfo(init_and_sync):
def test_skip_treeinfo(init_and_sync, has_pulp_plugin):
# Sync repo. Should create only main repo, not subrepos
_, _, task = init_and_sync(
url=RPM_KICKSTART_FIXTURE_URL, skip_types=["treeinfo"], return_task=True
)
rsrvd_repos = [r for r in task.reserved_resources_record if "/repositories/rpm/rpm/" in r]
rsrvd = "prn:rpm.rpmrepository" if has_pulp_plugin("core", "3.55") else "/repositories/rpm/rpm/"
rsrvd_repos = [r for r in task.reserved_resources_record if rsrvd in r]
assert 1 == len(rsrvd_repos)

# Sync again, including kstree. Should end up w/ 5 repos reserved.
_, _, task = init_and_sync(url=RPM_KICKSTART_FIXTURE_URL, return_task=True)
rsrvd_repos = [r for r in task.reserved_resources_record if "/repositories/rpm/rpm/" in r]
rsrvd_repos = [r for r in task.reserved_resources_record if rsrvd in r]
assert 5 == len(rsrvd_repos)


Expand Down

0 comments on commit 590e07e

Please sign in to comment.