Sha256: 7af02f57dce1c9b5d36ef8249fa3b527ee0b27e71e3d3b4e0f61203430d1e098

Contents?: true

Size: 827 Bytes

Versions: 5

Compression:

Stored size: 827 Bytes

Contents

Shindo.tests('Fog::Compute[:brightbox] | interface requests', ['brightbox']) do

  tests('success') do

    unless Fog.mocking?
      server = Fog::Compute[:brightbox].servers.first
      @interface_id = server.interfaces.first["id"]
    end

    tests("#get_interface('#{@interface_id}')") do
      pending if Fog.mocking?
      result = Fog::Compute[:brightbox].get_interface(@interface_id)
      formats(Brightbox::Compute::Formats::Full::INTERFACE) { result }
    end

  end

  tests('failure') do

    tests("#get_interface('int-00000')").raises(Excon::Errors::NotFound) do
      pending if Fog.mocking?
      Fog::Compute[:brightbox].get_interface('int-00000')
    end

    tests("#get_interface()").raises(ArgumentError) do
      pending if Fog.mocking?
      Fog::Compute[:brightbox].get_interface()
    end
  end

end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/interface_tests.rb
fog-1.1.2 tests/brightbox/requests/compute/interface_tests.rb
fog_tractical-1.1.4 tests/brightbox/requests/compute/interface_tests.rb
fog_tractical-1.1.3 tests/brightbox/requests/compute/interface_tests.rb