Sha256: ba96b62fadfc9eabcc82933d2b3e95056320b2f7079adbbe3fb793d003c3b183

Contents?: true

Size: 1.35 KB

Versions: 57

Compression:

Stored size: 1.35 KB

Contents

Shindo.tests('Compute::VcloudDirector | task requests', ['vclouddirector']) do

  @service = Fog::Compute::VcloudDirector.new

  tests('error conditions') do
    tests('retrieve non-existent TasksList').raises(Fog::Compute::VcloudDirector::Forbidden) do
      @service.get_task_list('00000000-0000-0000-0000-000000000000')
    end
    tests('retrieve non-existent Task').raises(Fog::Compute::VcloudDirector::Forbidden) do
      @service.get_task('00000000-0000-0000-0000-000000000000')
    end
    tests('cancel non-existent Task').raises(Fog::Compute::VcloudDirector::Forbidden) do
      @service.post_cancel_task('00000000-0000-0000-0000-000000000000')
    end
  end

  @org_id = VcloudDirector::Compute::Helper.current_org_id(@service)

  tests('#get_task_list').data_matches_schema(VcloudDirector::Compute::Schema::TASKS_LIST_TYPE) do
    session = @service.get_current_session.body
    org_href = session[:Link].find {|l| l[:type] == 'application/vnd.vmware.vcloud.org+xml'}[:href]
    @org_uuid = org_href.split('/').last
    @tasks_list = @service.get_task_list(@org_uuid).body
  end

  tests('each task in the task list') do
    @tasks_list[:Task].each do |task|
      task_id = task[:href].split('/').last
      tests("#get_task(#{task_id}").data_matches_schema(VcloudDirector::Compute::Schema::TASK_TYPE) do
        @service.get_task(task_id).body
      end
    end
  end

end

Version data entries

57 entries across 55 versions & 7 rubygems

Version Path
fog-2.3.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-ifeel-2.2.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-2.2.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-2.1.0 tests/vcloud_director/requests/compute/task_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/tests/vcloud_director/requests/compute/task_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/tests/vcloud_director/requests/compute/task_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/tests/vcloud_director/requests/compute/task_tests.rb
fog-1.42.1 tests/vcloud_director/requests/compute/task_tests.rb
fog-vcloud-director-0.2.2 tests/vcloud_director/requests/compute/task_tests.rb
fog-vcloud-director-0.2.1 tests/vcloud_director/requests/compute/task_tests.rb
fog-vcloud-director-0.2.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-vcloud-director-0.1.10 tests/vcloud_director/requests/compute/task_tests.rb
fog-vcloud-director-0.1.9 tests/vcloud_director/requests/compute/task_tests.rb
fog-2.0.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-1.42.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-1.41.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-1.40.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-1.39.0 tests/vcloud_director/requests/compute/task_tests.rb
fog-vcloud-director-0.1.8 tests/vcloud_director/requests/compute/task_tests.rb
fog-vcloud-director-0.1.7 tests/vcloud_director/requests/compute/task_tests.rb