Sha256: 4116625862391a62d6c52582531234b4c41a7688c4b9f4072d839c1940d787b5

Contents?: true

Size: 953 Bytes

Versions: 7

Compression:

Stored size: 953 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-EXT-DATA:ephemeral' => Integer,
      '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

7 entries across 7 versions & 3 rubygems

Version Path
gapinc-fog-1.12.1.2.1 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.15.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
gapinc-fog-1.14.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-maestrodev-1.14.0.20130806165225 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.14.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.13.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
gapinc-fog-1.12.1.2 tests/rackspace/requests/compute_v2/flavor_tests.rb