Sha256: eda076140212627903740be8df60c5d3d5501a9f5621e1df0d3bbc53ec5bb596

Contents?: true

Size: 1.77 KB

Versions: 23

Compression:

Stored size: 1.77 KB

Contents

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

  @google = Fog::Compute[:google]

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

  @get_disk_format = {
      'kind' => String,
      'id' => String,
      'selfLink' => String,
      'creationTimestamp' => String,
      'name' => String,
      'zone' => String,
      'status' => String,
      'sizeGb' => String,
      'sourceImageId' => String,
      'sourceImage' => String,
      'type' => String,
  }

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

  tests('success') do

    disk_name = 'new-disk-test'
    disk_size = '2'
    zone_name = 'us-central1-a'
    image_name = 'debian-7-wheezy-v20140408'

    # These will all fail if errors happen on insert
    tests("#insert_disk").formats(@insert_disk_format) do
      response = @google.insert_disk(disk_name, zone_name, image_name).body
      wait_operation(@google, response)
      response
    end

    tests("#get_disk").formats(@get_disk_format) do
      @google.get_disk(disk_name, zone_name).body
    end

    tests("#delete_disk").formats(@delete_disk_format) do
      @google.delete_disk(disk_name, zone_name).body
    end

  end

end

Version data entries

23 entries across 21 versions & 5 rubygems

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