Sha256: 31fbad998e86cf791a28f2b2cf1c8eff18cc5f1b18474ed251088434823de28b

Contents?: true

Size: 1.14 KB

Versions: 29

Compression:

Stored size: 1.14 KB

Contents

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

  @test_service = Fog::Compute[:brightbox]

  tests('success') do

    unless Fog.mocking?
      server = @test_service.servers.first

      # If no server is available, create one just for the test
      unless server
        @test_server = Brightbox::Compute::TestSupport.get_test_server
        server = @test_server
      end

      @interface_id = server.interfaces.first["id"]
    end

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

    unless Fog.mocking?
      # If we created a server just for this test, clean it up
      @test_server.destroy if @test_server
    end

  end

  tests('failure') do

    tests("#get_interface('int-00000')").raises(Excon::Errors::NotFound) do
      pending if Fog.mocking?
      @test_service.get_interface('int-00000')
    end

    tests("#get_interface()").raises(ArgumentError) do
      pending if Fog.mocking?
      @test_service.get_interface()
    end
  end

end

Version data entries

29 entries across 29 versions & 8 rubygems

Version Path
gapinc-fog-1.12.1.2.1 tests/brightbox/requests/compute/interface_tests.rb
fog-maestrodev-1.15.0.20130829165835 tests/brightbox/requests/compute/interface_tests.rb
fog-1.15.0 tests/brightbox/requests/compute/interface_tests.rb
gapinc-fog-1.14.0 tests/brightbox/requests/compute/interface_tests.rb
fog-maestrodev-1.14.0.20130806165225 tests/brightbox/requests/compute/interface_tests.rb
fog-1.14.0 tests/brightbox/requests/compute/interface_tests.rb
fog-1.13.0 tests/brightbox/requests/compute/interface_tests.rb
gapinc-fog-1.12.1.2 tests/brightbox/requests/compute/interface_tests.rb
gapinc-fog-1.12.1.1 tests/brightbox/requests/compute/interface_tests.rb
gapinc-fog-1.12.1a tests/brightbox/requests/compute/interface_tests.rb
gapinc-fog-1.12.1 tests/brightbox/requests/compute/interface_tests.rb
fog-1.12.1 tests/brightbox/requests/compute/interface_tests.rb
fog-1.12.0 tests/brightbox/requests/compute/interface_tests.rb
hpfog-0.0.20 tests/brightbox/requests/compute/interface_tests.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/tests/brightbox/requests/compute/interface_tests.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/tests/brightbox/requests/compute/interface_tests.rb
fog-nirvanix-1.8.2 tests/brightbox/requests/compute/interface_tests.rb
fog-1.11.1 tests/brightbox/requests/compute/interface_tests.rb
fog-1.11.0 tests/brightbox/requests/compute/interface_tests.rb
fog-nirvanix-1.8.1 tests/brightbox/requests/compute/interface_tests.rb