Sha256: e6507110d101e4ccff1093d8d51a2c6271586ca37bc81e23bc8e4787f53e2852

Contents?: true

Size: 971 Bytes

Versions: 39

Compression:

Stored size: 971 Bytes

Contents

Shindo.tests('Fog::Compute[:rackspace] | flavor requests', ['rackspace']) do

  @flavor_format = {
    'disk'  => Integer,
    'id'    => Integer,
    'name'  => String,
    'ram'   => Integer
  }

  @service = Fog::Compute.new(:provider => :rackspace, :version => :v1)

  tests('success') do
    tests('#get_flavor_details(1)').formats(@flavor_format) do
      pending if Fog.mocking?
       @service.get_flavor_details(1).body['flavor']
    end

    tests('#list_flavors').formats({'flavors' => [Rackspace::Compute::Formats::SUMMARY]}) do
      pending if Fog.mocking?
       @service.list_flavors.body
    end

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

  end

  tests('failure') do

    tests('#get_flavor_details(0)').raises(Fog::Compute::Rackspace::NotFound) do
      pending if Fog.mocking?
       @service.get_flavor_details(0)
    end

  end

end

Version data entries

39 entries across 37 versions & 6 rubygems

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