Sha256: e3c52e29c1d8d37d03c261afd4136cd6b673a42fb7c45d03753014e5da99c899

Contents?: true

Size: 1.01 KB

Versions: 64

Compression:

Stored size: 1.01 KB

Contents

Shindo.tests('Fog::Compute[:brightbox] | server type requests', ['brightbox']) do

  tests('success') do

    tests("#list_server_types") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].list_server_types
      @server_type_id = result.first["id"]
      data_matches_schema(Brightbox::Compute::Formats::Collection::SERVER_TYPES, {:allow_extra_keys => true}) { result }
    end

    tests("#get_server_type('#{@server_type_id}')") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].get_server_type(@server_type_id)
      data_matches_schema(Brightbox::Compute::Formats::Full::SERVER_TYPE, {:allow_extra_keys => true}) { result }
    end

  end

  tests('failure') do

    tests("#get_server_type('typ-00000')").raises(Excon::Errors::NotFound) do
      pending if Fog.mocking?
      Fog::Compute[:brightbox].get_server_type('typ-00000')
    end

    tests("#get_server").raises(ArgumentError) do
      pending if Fog.mocking?
      Fog::Compute[:brightbox].get_server_type
    end

  end

end

Version data entries

64 entries across 64 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/brightbox/requests/compute/server_type_tests.rb
fog-1.33.0 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.32.0 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.31.0 tests/brightbox/requests/compute/server_type_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/brightbox/requests/compute/server_type_tests.rb
fog-1.30.0 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.29.0 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.28.0 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.27.0 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.26.0 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.25.0 tests/brightbox/requests/compute/server_type_tests.rb
nsidc-fog-1.24.1 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.24.0 tests/brightbox/requests/compute/server_type_tests.rb
ns-fog-1.22.11 tests/brightbox/requests/compute/server_type_tests.rb
ns-fog-1.22.10 tests/brightbox/requests/compute/server_type_tests.rb
ns-fog-1.22.9 tests/brightbox/requests/compute/server_type_tests.rb
ns-fog-1.22.8 tests/brightbox/requests/compute/server_type_tests.rb
ns-fog-1.22.7 tests/brightbox/requests/compute/server_type_tests.rb
ns-fog-1.22.6 tests/brightbox/requests/compute/server_type_tests.rb
fog-1.23.0 tests/brightbox/requests/compute/server_type_tests.rb