Sha256: b54470b38f5600637ac5b704839e05a81e982908d30a6a80b65907467fb721d8

Contents?: true

Size: 1.8 KB

Versions: 87

Compression:

Stored size: 1.8 KB

Contents

Shindo.tests('Fog::Compute[:glesys] | ip requests', ['glesys']) do

  @free_ip = nil
  @ips = nil

  tests('success') do

    tests("#ip_list_own()").formats(Glesys::Compute::Formats::Ips::IPLIST) do
      pending if Fog.mocking?
      Fog::Compute[:glesys].ip_list_own.body['response']
    end

    tests("#ip_list_free(:datacenter => 'Falkenberg, :platform => 'Xen', :ipversion => 4)"
    ).formats(Glesys::Compute::Formats::Ips::IPLIST_ALL) do
      pending if Fog.mocking?
      ips = Fog::Compute[:glesys].ip_list_free(
        :datacenter => "Falkenberg",
        :platform   => "Xen",
        :ipversion  => 4
      )
      @free_ip = ips.body['response']['iplist']['ipaddresses'].first
      ips.body['response']
    end

    tests("#ip_take(:datacenter => 'Falkenberg', :platform => 'Xen', :ipversion => 4, :ipaddress => #{@free_ip})"
    ).formats(Glesys::Compute::Formats::Ips::IPLIST_CATCH_RELEASE) do
      pending if Fog.mocking?
      Fog::Compute[:glesys].ip_take(
        :datacenter => "Falkenberg",
        :platform   => "Xen",
        :ipversion  => 4,
        :ipaddress  => @free_ip
      ).body['response']
    end

    tests("#ip_release(:ipaddress => '#{@free_ip}', :ipversion => 4)"
    ).formats(Glesys::Compute::Formats::Ips::IPLIST_CATCH_RELEASE) do
      pending if Fog.mocking?
      Fog::Compute[:glesys].ip_release(
        :ipaddress => @free_ip,
        :ipversion => 4
      ).body['response']
    end

    # ip_details()
    # ip_add()
    # ip_remove()

 end

  tests('failure') do

    tests("#ip_take_argument_error()").raises(Excon::Errors::HTTPStatusError) do
      pending if Fog.mocking?
      ip = Fog::Compute[:glesys].ips.new(
        :datacenter => "Falkenberg",
        :platform   => "Xen",
        :version    => 4,
        :ip         => "127.0.0.1"
      )
      ip.take
    end

  end


end

Version data entries

87 entries across 87 versions & 15 rubygems

Version Path
fog-1.22.0 tests/glesys/requests/compute/ip_tests.rb
fog-1.21.0 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/glesys/requests/compute/ip_tests.rb
fog-1.20.0 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/glesys/requests/compute/ip_tests.rb
fog-1.19.0 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/glesys/requests/compute/ip_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/glesys/requests/compute/ip_tests.rb