Project

General

Profile

« Previous | Next » 

Revision ddfc4136

Added by Partha Aji over 8 years ago

Fixes #13284 - Enables Taskgroups for Applicablity

The regenerate applicable errata call for a repository can return
either a Task Group or a list of spawned tasks. This commit enables
the use of that.
This is an important change in pulp 2.8.
Look at
https://github.com/pulp/pulp/blob/master/docs/dev-guide/integration/rest-api/consumer/applicability.rst#generate-content-applicability-for-updated-repositories
for more info.

View differences:

test/extensions/repository_test.rb
assert_equal 200, response.code
end
def test_generate_applicability_by_ids
response = @extension.regenerate_applicability_by_ids([@consumer_id])
def test_generate_applicability_by_ids_with_spawned_tasks
response = @extension.regenerate_applicability_by_ids([RepositorySupport.repo_id], false)
refute response.key?("group_id")
tasks = assert_async_response(response)
assert_equal 'finished', tasks.first['state']
end
def test_generate_applicability_by_ids_with_task_groups
response = @extension.regenerate_applicability_by_ids([RepositorySupport.repo_id], true)
assert response.key?("group_id")
assert_async_response(response)
end
end
class TestRepositoryUnitList < MiniTest::Unit::TestCase

Also available in: Unified diff