Sha256: 2c630dfccab8f2293611a6a76f9e33ab7f25f8d50a92dac0732023eb6611d266

Contents?: true

Size: 550 Bytes

Versions: 10

Compression:

Stored size: 550 Bytes

Contents

require 'securerandom'

# create a disk to be used in tests
def create_test_disk(connection, zone)
  zone = 'us-central1-a'
  random_string = SecureRandom.hex

  disk = connection.disks.create({
    :name => "fog-test-disk-#{random_string}",
    :size_gb => "10",
    :zone => zone,
    :source_image => "debian-7-wheezy-v20140408",
  })
  disk.wait_for { ready? }
  disk
end

def wait_operation(connection, response)
  operation = connection.operations.get(response['name'], response['zone'], response['region'])
  operation.wait_for { ready? }
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
ns-fog-1.22.11 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.10 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.9 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.8 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.7 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.6 tests/google/helpers/google_tests_helper.rb
fog-1.23.0 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.4 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.3 tests/google/helpers/google_tests_helper.rb
ns-fog-1.22.2 tests/google/helpers/google_tests_helper.rb