Sha256: c20a7788bc1257c988385df5a446d9f0f1d08bdd56a0f41baa7082cbcc68ed6f

Contents?: true

Size: 1.1 KB

Versions: 80

Compression:

Stored size: 1.1 KB

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('#list_flavors_detail').formats(list_flavor_format) do
      body = service.list_flavors_detail.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

80 entries across 78 versions & 7 rubygems

Version Path
fog-rackspace-0.1.6 tests/rackspace/requests/compute_v2/flavor_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/compute_v2/flavor_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/compute_v2/flavor_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-rackspace-0.1.5 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-rackspace-0.1.4 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-rackspace-0.1.3 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-rackspace-0.1.2 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-rackspace-0.1.1 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-rackspace-0.1.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.37.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.36.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.35.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-2.0.0.pre.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.34.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.33.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.32.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
fog-1.31.0 tests/rackspace/requests/compute_v2/flavor_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/rackspace/requests/compute_v2/flavor_tests.rb