Sha256: 68d3f5f045fe5974f10e4506dcc91c91a816e6947bd26d2b70df62fa877e8d2f

Contents?: true

Size: 957 Bytes

Versions: 14

Compression:

Stored size: 957 Bytes

Contents

Shindo.tests('Fog::Compute::RackspaceV2 | flavor_tests', ['rackspace']) do

  flavor_format = {
    'id' => String,
    'name' => String,
    'ram' => Fog::Nullable::Integer,
    'disk' => Fog::Nullable::Integer,
    'vcpus' => Fog::Nullable::Integer,
    'links' => [{
      'rel' => String,
      'href' => String
    }]
  }

  list_flavor_format = {
    'flavors' => [flavor_format]
  }

  get_flavor_format = {
    'flavor' => flavor_format.merge({
      'OS-FLV-DISABLED:disabled' => Fog::Boolean,
      'rxtx_factor' => Float,
      'swap' => Integer
    })
  }

  service = Fog::Compute.new(:provider => 'Rackspace', :version => 'V2')
  flavor_id = nil

  tests('success') do
    tests('#list_flavors').formats(list_flavor_format) do
      body = service.list_flavors.body
      flavor_id = body['flavors'][0]['id']
      body
    end

    tests('#get_flavor').formats(get_flavor_format) do
      service.get_flavor(flavor_id).body
    end
  end
end

Version data entries

14 entries across 14 versions & 5 rubygems

Version Path
gapinc-fog-1.12.1.1 tests/rackspace/requests/compute_v2/flavor_tests.rb
gapinc-fog-1.12.1a tests/rackspace/requests/compute_v2/flavor_tests.rb
gapinc-fog-1.12.1 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.12.1 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.12.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
hpfog-0.0.20 tests/rackspace/requests/compute_v2/flavor_tests.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/tests/rackspace/requests/compute_v2/flavor_tests.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.11.1 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.11.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.10.1 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-test-me-1.10.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.10.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.9.0 tests/rackspace/requests/compute_v2/flavor_tests.rb