Sha256: ae56e8a46ee2f7dd523e7a64155b31a4203ca7862ce6f5e836f301d063991e2a

Contents?: true

Size: 879 Bytes

Versions: 23

Compression:

Stored size: 879 Bytes

Contents

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

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

  tests('success') do

    tests('#get_flavor_details(1)').formats(@flavor_format, false) do
      Fog::Compute[:openstack].get_flavor_details("1").body['flavor']
    end

    tests('#list_flavors').formats({'flavors' => [OpenStack::Compute::Formats::SUMMARY]}) do
      Fog::Compute[:openstack].list_flavors.body
    end

    tests('#list_flavors_detail').formats({'flavors' => [@flavor_format]}, false) do
      Fog::Compute[:openstack].list_flavors_detail.body
    end

  end

  tests('failure') do

    tests('#get_flavor_details(0)').raises(Fog::Compute::OpenStack::NotFound) do
      Fog::Compute[:openstack].get_flavor_details("0")
    end

  end

end

Version data entries

23 entries across 23 versions & 7 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
michiels-fog-1.3.1 tests/openstack/requests/compute/flavor_tests.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
fog-1.3.1 tests/openstack/requests/compute/flavor_tests.rb
fog-1.3.0 tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
fog-1.2.0 tests/openstack/requests/compute/flavor_tests.rb
ktheory-fog-1.1.2 tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
fog-1.1.2 tests/openstack/requests/compute/flavor_tests.rb
fog_tractical-1.1.4 tests/openstack/requests/compute/flavor_tests.rb
fog_tractical-1.1.3 tests/openstack/requests/compute/flavor_tests.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb
fog-1.1.1 tests/openstack/requests/compute/flavor_tests.rb
fog-1.1.0 tests/openstack/requests/compute/flavor_tests.rb