Sha256: 99b87eafd3b91dc11d63400642c442dc38732f18cfc20005708f410b838a7be1

Contents?: true

Size: 1.13 KB

Versions: 22

Compression:

Stored size: 1.13 KB

Contents

Shindo.tests('Fog::Google[:sql] | operation requests', ['google']) do
  @sql = Fog::Google[:sql]
  @instance_id = Fog::Mock.random_letters(16)
  @instance = @sql.instances.create(:instance => @instance_id, :tier => 'D1')
  @instance.wait_for { ready? }

  @get_operation_format = {
    'operation' => String,
    'endTime' => Fog::Nullable::String,
    'enqueuedTime' => String,
    'error' => Fog::Nullable::Array,
    'exportContext' => Fog::Nullable::Array,
    'importContext' => Fog::Nullable::Array,
    'instance' => String,
    'kind' => String,
    'operationType' => String,
    'startTime' => Fog::Nullable::String,
    'state' => String,
    'userEmailAddress' => String,
  }

  @list_operations_format = {
    'kind' => String,
    'items' => [@get_operation_format],
  }

  tests('success') do

    tests('#list_operations').formats(@list_operations_format) do
      @sql.list_operations(@instance_id).body
    end

    tests('#get_operation').formats(@get_operation_format) do
      operation_id = @sql.operations.all(@instance_id).first.operation
      @sql.get_operation(@instance_id, operation_id).body
    end

  end

  @instance.destroy

end

Version data entries

22 entries across 20 versions & 5 rubygems

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