Sha256: 427095d35268fd0d22df608bbe88073d8ef9990a061f052ce7bbd41c359c7780

Contents?: true

Size: 1.66 KB

Versions: 14

Compression:

Stored size: 1.66 KB

Contents

Shindo.tests("Fog::Compute[:google] | network requests", ["google"]) do
  pending if Fog.mocking?

  @google = Fog::Compute[:google]

  @insert_network_format = {
    "kind" => String,
    "id" => String,
    "selfLink" => String,
    "name" => String,
    "targetLink" => String,
    "status" => String,
    "user" => String,
    "progress" => Integer,
    "insertTime" => String,
    "startTime" => String,
    "operationType" => String
  }

  @get_network_format = {
    "kind" => String,
    "id" => String,
    "selfLink" => String,
    "creationTimestamp" => String,
    "name" => String,
    "IPv4Range" => String,
    "gatewayIPv4" => String
  }

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

  @list_networks_format = {
    "kind" => String,
    "id" => String,
    "selfLink" => String,
    "items" => [@get_network_format]
  }

  tests("success") do
    network_name = "new-network-test"
    ip_range = "192.168.0.0/16"

    tests("#insert_network").formats(@insert_network_format) do
      @google.insert_network(network_name, ip_range).body
    end

    tests("#get_network").formats(@get_network_format) do
      @google.get_network(network_name).body
    end

    tests("#list_networks").formats(@list_networks_format) do
      @google.list_networks.body
    end

    tests("#delete_network").formats(@delete_network_format) do
      @google.delete_network(network_name).body
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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