2013-09-27 11:32:49 -04:00
|
|
|
Shindo.tests('Compute::VcloudDirector | task requests', ['vclouddirector']) do
|
|
|
|
|
|
|
|
@service = Fog::Compute::VcloudDirector.new
|
|
|
|
|
2013-10-08 13:46:06 -04:00
|
|
|
tests('#get_task_list').data_matches_schema(VcloudDirector::Compute::Schema::TASKS_LIST_TYPE) do
|
2013-09-27 11:32:49 -04:00
|
|
|
session = @service.get_current_session.body
|
|
|
|
org_href = session[:Link].detect {|l| l[:type] == 'application/vnd.vmware.vcloud.org+xml'}[:href]
|
|
|
|
@org_uuid = org_href.split('/').last
|
2013-10-01 03:43:28 -04:00
|
|
|
@tasks_list = @service.get_task_list(@org_uuid).body
|
2013-09-27 11:32:49 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
tests('retrieve non-existent TasksList').raises(Excon::Errors::Forbidden) do
|
2013-10-01 03:43:28 -04:00
|
|
|
@service.get_task_list('00000000-0000-0000-0000-000000000000')
|
2013-09-27 11:32:49 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|