Sha256: 781bafcada948c928186f1bab4d9e4a5a5ff34168b8132eceaf8d9739f02be22

Contents?: true

Size: 1.18 KB

Versions: 65

Compression:

Stored size: 1.18 KB

Contents

Shindo.tests('Fog::Compute[:rackspace] | address requests', ['rackspace']) do

  @service = Fog::Compute.new(:provider => :rackspace, :version => :v1)
  
  tests('success') do
 
    @server = @service.servers.create(:flavor_id => 1, :image_id => 19)

    tests("#list_addresses(#{@server.id})").formats({'addresses' => {'private' => [String], 'public' => [String]}}) do
      @service.list_addresses(@server.id).body
    end

    tests("#list_private_addresses(#{@server.id})").formats({'private' => [String]}) do
      @service.list_private_addresses(@server.id).body
    end

    tests("#list_public_addresses(#{@server.id})").formats({'public' => [String]}) do
      @service.list_public_addresses(@server.id).body
    end

    @server.wait_for { ready? }
    @server.destroy

  end

  tests('failure') do
  
    tests('#list_addresses(0)').raises(Fog::Compute::Rackspace::NotFound) do
      @service.list_addresses(0)
    end

    tests('#list_private_addresses(0)').raises(Fog::Compute::Rackspace::NotFound) do
      @service.list_private_addresses(0)
    end

    tests('#list_public_addresses(0)').raises(Fog::Compute::Rackspace::NotFound) do
      @service.list_public_addresses(0)
    end

  end

end

Version data entries

65 entries across 65 versions & 6 rubygems

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