Sha256: 38830654a646eaa09b618c2091837ed8dc25cffb1b35bf3d529efea5a9481c84

Contents?: true

Size: 1.73 KB

Versions: 64

Compression:

Stored size: 1.73 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

64 entries across 62 versions & 7 rubygems

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