Sha256: 57a02e2343a556957a5e9a848eecbc850875e21e1f00ef2e90a32bd2bb1b7b4d

Contents?: true

Size: 1011 Bytes

Versions: 34

Compression:

Stored size: 1011 Bytes

Contents

Shindo.tests('Fog::Compute[:google] | region requests', ['google']) do
  @google = Fog::Compute[:google]

  @get_region_format = {
      'kind' => String,
      'selfLink' => String,
      'id' => String,
      'creationTimestamp' => String,
      'name' => String,
      'description' => String,
      'status' => String,
      'zones' => Array,
      'quotas' => [{ 'metric' => String, 'limit' => Float, 'usage' => Float }],
  }

  @list_regions_format = {
      'kind' => String,
      'selfLink' => String,
      'id' => String,
      'items' => [@get_region_format]
  }

  tests('success') do
    tests("#get_region").formats(@get_region_format) do
      region = @google.list_regions.body['items'].first['name']
      @google.get_region(region).body
    end

    tests("#list_regions").formats(@list_regions_format) do
      @google.list_regions.body
    end
  end

  tests('failure') do
    tests("#get_region").raises(Fog::Errors::NotFound) do
      @google.get_region('unicorn').body
    end
  end
end

Version data entries

34 entries across 32 versions & 6 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/tests/requests/compute/region_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/tests/requests/compute/region_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/tests/requests/compute/region_tests.rb
fog-google-0.1.3 tests/requests/compute/region_tests.rb
fog-google-0.1.2 tests/requests/compute/region_tests.rb
fog-google-0.1.1 tests/requests/compute/region_tests.rb
fog-google-0.1.0 tests/requests/compute/region_tests.rb
fog-google-0.0.9 tests/requests/compute/region_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-google-0.0.7/tests/requests/compute/region_tests.rb
fog-google-0.0.7 tests/requests/compute/region_tests.rb
fog-google-0.0.6 tests/requests/compute/region_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/google/requests/compute/region_tests.rb
fog-google-0.0.5 tests/requests/compute/region_tests.rb
fog-google-0.0.4 tests/requests/compute/region_tests.rb
fog-google-0.0.3 tests/requests/compute/region_tests.rb
fog-google-0.0.2 tests/requests/compute/region_tests.rb
fog-1.29.0 tests/google/requests/compute/region_tests.rb
fog-1.28.0 tests/google/requests/compute/region_tests.rb
fog-1.27.0 tests/google/requests/compute/region_tests.rb
fog-1.26.0 tests/google/requests/compute/region_tests.rb