mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
dc2006769b
This renames most request methods in line with page names in the vCloud API documentation. Previous method names remain as deprecations.
19 lines
684 B
Ruby
19 lines
684 B
Ruby
Shindo.tests('Compute::VcloudDirector | task requests', ['vclouddirector']) do
|
|
|
|
@service = Fog::Compute::VcloudDirector.new
|
|
|
|
tests('get current organization') do
|
|
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
|
|
end
|
|
|
|
tests('#get_task_list').data_matches_schema(VcloudDirector::Compute::Schema::TASKS_LIST_TYPE) do
|
|
@tasks_list = @service.get_task_list(@org_uuid).body
|
|
end
|
|
|
|
tests('retrieve non-existent TasksList').raises(Excon::Errors::Forbidden) do
|
|
@service.get_task_list('00000000-0000-0000-0000-000000000000')
|
|
end
|
|
|
|
end
|