Sha256: a769949aa2a70f542112a3a8206802d3ec637474886e8886d01900145ef9bb56

Contents?: true

Size: 1.03 KB

Versions: 67

Compression:

Stored size: 1.03 KB

Contents

Shindo.tests("Fog::Compute::HPV2 | flavor requests", ['hp', 'v2', 'compute']) do

  service = Fog::Compute.new(:provider => 'HP', :version => :v2)

  @flavor_format = {
    'id'         => String,
    'name'       => String,
    'vcpus'      => Integer,
    'disk'       => Integer,
    'ram'        => Integer,
    'OS-FLV-EXT-DATA:ephemeral' => Integer,
    'links'      => [Hash]
  }

  @list_flavors_format = {
    'id'    => String,
    'name'  => String,
    'links' => [Hash]
  }

  tests('success') do

    tests('#list_flavors').formats({'flavors' => [@list_flavors_format]}) do
      service.list_flavors.body
    end

    tests('#get_flavor_details("1")').formats(@flavor_format) do
      service.get_flavor_details("1").body['flavor']
    end

    tests('#list_flavors_detail').formats({'flavors' => [@flavor_format]}) do
      service.list_flavors_detail.body
    end

  end

  tests('failure') do

    tests('#get_flavor_details("9999")').raises(Fog::Compute::HPV2::NotFound) do
      service.get_flavor_details('9999')
    end

  end

end

Version data entries

67 entries across 67 versions & 5 rubygems

Version Path
fog-1.38.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.37.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.36.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.35.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-2.0.0.pre.0 tests/hp/requests/compute_v2/flavor_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.34.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.33.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.32.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.31.0 tests/hp/requests/compute_v2/flavor_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.30.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.29.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.28.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.27.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.26.0 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.25.0 tests/hp/requests/compute_v2/flavor_tests.rb
nsidc-fog-1.24.1 tests/hp/requests/compute_v2/flavor_tests.rb
fog-1.24.0 tests/hp/requests/compute_v2/flavor_tests.rb
ns-fog-1.22.11 tests/hp/requests/compute_v2/flavor_tests.rb