Sha256: a05b01186b4eb88fae072de1621aa7b53d515f0b4fea777d3acc85a73c838270

Contents?: true

Size: 1.13 KB

Versions: 14

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

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 tests/requests/sql/operation_tests.rb
fog-google-0.5.5 tests/requests/sql/operation_tests.rb
fog-google-0.5.4 tests/requests/sql/operation_tests.rb
fog-google-0.5.3 tests/requests/sql/operation_tests.rb
fog-google-0.5.2 tests/requests/sql/operation_tests.rb
fog-google-0.5.1 tests/requests/sql/operation_tests.rb
fog-google-0.5.0 tests/requests/sql/operation_tests.rb
fog-google-0.4.2 tests/requests/sql/operation_tests.rb
fog-google-0.4.1 tests/requests/sql/operation_tests.rb
fog-google-0.4.0 tests/requests/sql/operation_tests.rb
fog-google-0.3.2 tests/requests/sql/operation_tests.rb
fog-google-0.3.1 tests/requests/sql/operation_tests.rb
fog-google-0.3.0 tests/requests/sql/operation_tests.rb
fog-google-0.2.0 tests/requests/sql/operation_tests.rb