Sha256: b36ecc07ae84b76f23fdcdc11f8c9a5d450881f77031796b1b0fe3a647a0ad06

Contents?: true

Size: 1.4 KB

Versions: 140

Compression:

Stored size: 1.4 KB

Contents

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

  tests('success') do

    tests("#associate_ip_address()").formats(Ninefold::Compute::Formats::Addresses::ADDRESS) do
      pending if Fog.mocking?
      job = newaddress = Fog::Compute[:ninefold].associate_ip_address(:zoneid => Ninefold::Compute::TestSupport::ZONE_ID)
      while Fog::Compute[:ninefold].query_async_job_result(:jobid => job['jobid'])['jobstatus'] == 0
        sleep 1
      end
      result = Fog::Compute[:ninefold].query_async_job_result(:jobid => job['jobid'])['jobresult']['ipaddress']
      @newaddressid = result['id']
      result
    end

    tests("#list_public_ip_addresses()").formats(Ninefold::Compute::Formats::Addresses::ADDRESSES) do
      pending if Fog.mocking?
      result = Fog::Compute[:ninefold].list_public_ip_addresses
      result
    end

    tests("#disassociate_ip_address()").formats(Ninefold::Compute::Formats::Addresses::DISASSOC_ADDRESS) do
      pending if Fog.mocking?
      job = Fog::Compute[:ninefold].disassociate_ip_address(:id => @newaddressid)
      while Fog::Compute[:ninefold].query_async_job_result(:jobid => job['jobid'])['jobstatus'] == 0
        sleep 1
      end
      job
    end

  end

  tests('failure') do

    tests("#associate_ip_address()").raises(Excon::Errors::HTTPStatusError) do
      pending if Fog.mocking?
      Fog::Compute[:ninefold].associate_ip_address
    end

  end

end

Version data entries

140 entries across 140 versions & 21 rubygems

Version Path
fog-1.38.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.37.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.36.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.35.0 tests/ninefold/requests/compute/address_tests.rb
fog-2.0.0.pre.0 tests/ninefold/requests/compute/address_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/ninefold/requests/compute/address_tests.rb
fog-1.34.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.33.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.32.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.31.0 tests/ninefold/requests/compute/address_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/ninefold/requests/compute/address_tests.rb
fog-1.30.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.29.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.28.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.27.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.26.0 tests/ninefold/requests/compute/address_tests.rb
fog-1.25.0 tests/ninefold/requests/compute/address_tests.rb
nsidc-fog-1.24.1 tests/ninefold/requests/compute/address_tests.rb
fog-1.24.0 tests/ninefold/requests/compute/address_tests.rb
ns-fog-1.22.11 tests/ninefold/requests/compute/address_tests.rb