Sha256: 0179fca4124ee8f0bdc8f6eb5ca92a4fb13bb39712aec227090bfb7235e68d79

Contents?: true

Size: 1.87 KB

Versions: 25

Compression:

Stored size: 1.87 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,
      'preferredKernel' => 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
      @google.insert_image(image_name, source).body
    end

    tests("#get_image").formats(@get_image_format) do
      @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
      @google.insert_image(image_name, source)
      @google.delete_image(image_name).body
    end

  end

end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
fog-maestrodev-1.18.0.20131121075022 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131118164830 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131115184302 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131114200144 tests/google/requests/compute/image_tests.rb
gapinc-fog-1.12.1.2.1 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131112185232 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.18.0.20131111203459 tests/google/requests/compute/image_tests.rb
fog-1.18.0 tests/google/requests/compute/image_tests.rb
fog-1.17.0 tests/google/requests/compute/image_tests.rb
fog-1.16.0 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.15.0.20130927082724 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.15.0.20130829165835 tests/google/requests/compute/image_tests.rb
fog-1.15.0 tests/google/requests/compute/image_tests.rb
gapinc-fog-1.14.0 tests/google/requests/compute/image_tests.rb
fog-maestrodev-1.14.0.20130806165225 tests/google/requests/compute/image_tests.rb
fog-1.14.0 tests/google/requests/compute/image_tests.rb
fog-1.13.0 tests/google/requests/compute/image_tests.rb
gapinc-fog-1.12.1.2 tests/google/requests/compute/image_tests.rb
gapinc-fog-1.12.1.1 tests/google/requests/compute/image_tests.rb
gapinc-fog-1.12.1a tests/google/requests/compute/image_tests.rb