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/test_runner.rb
def assert_async_response(response)
support = @support || self.class.support
fail '@support or @@supsport not defined' unless support
fail '@support or @@support not defined' unless support
if response.key? "group_id"
assert_async_task_groups(response, support)
else
assert_async_tasks(response, support)
end
end
def assert_async_tasks(response, support)
assert_equal 202, response.code
tasks = support.wait_on_response(response)
tasks.each do |task|
assert task['state'], 'finished'
end
end
def assert_async_task_groups(response, support)
assert_equal 202, response.code
summary = support.wait_on_task_group(response)
assert_equal summary["total"], summary["finished"]
summary
end
end
end
end

Also available in: Unified diff