Sha256: acb04bea1e20c82bd78c6a81a30c0c0b8831837d53793d057810c9d32804fafd

Contents?: true

Size: 1.92 KB

Versions: 20

Compression:

Stored size: 1.92 KB

Contents

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

  @google = Fog::Compute[:google]

  @insert_image_format = {
      'kind' => String,
      'id' => String,
      'selfLink' => String,
      'name' => String,
      'targetLink' => String,
      'status' => String,
      'user' => String,
      'progress' => Integer,
      'insertTime' => String,
      'startTime' => String,
      'operationType' => String
  }

  @get_image_format = {
      'kind' => String,
      'id' => String,
      'creationTimestamp' => String,
      'selfLink' => String,
      'name' => String,
      'description' => String,
      'sourceType' => String,
      'rawDisk' => {
        'containerType' => String,
        'source' => String
      }
  }

  @delete_image_format = {
      'kind' => String,
      'id' => String,
      'selfLink' => String,
      'name' => String,
      'targetLink' => String,
      'status' => String,
      'user' => String,
      'progress' => Integer,
      'insertTime' => String,
      'startTime' => String,
      'operationType' => String
  }

  @list_images_format = {
      'kind' => String,
      'id' => String,
      'selfLink' => String,
      'items' => [@get_image_format]
  }

  tests('success') do

    image_name = 'test-image'
    source = 'https://www.google.com/images/srpr/logo4w.png'

    tests("#insert_image").formats(@insert_image_format) do
      pending if Fog.mocking?
      @google.insert_image(image_name, source).body
    end

    tests("#get_image").formats(@get_image_format) do
      pending if Fog.mocking?
      @google.insert_image(image_name, source)
      @google.get_image(image_name).body
    end

    tests("#list_images").formats(@list_images_format) do
      @google.list_images.body
    end

    tests("#delete_image").formats(@delete_image_format) do
      pending if Fog.mocking?
      @google.insert_image(image_name, source)
      @google.delete_image(image_name).body
    end

  end

end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/google/requests/compute/image_tests.rb
fog-1.22.1 tests/google/requests/compute/image_tests.rb
fog-1.22.0 tests/google/requests/compute/image_tests.rb
fog-1.21.0 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/google/requests/compute/image_tests.rb
fog-1.20.0 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/google/requests/compute/image_tests.rb