Sha256: cabe06fd815bebad76190f48c055eac11d2809d9a2d27564b8316217980bf6c9

Contents?: true

Size: 881 Bytes

Versions: 41

Compression:

Stored size: 881 Bytes

Contents

Shindo.tests('Fog::Compute::RackspaceV2 | virtual_interface', ['rackspace']) do
  service = Fog::Compute::RackspaceV2.new

  net_options = {
    :label => "fog_network_#{Time.now.to_i.to_s}",
    :cidr => '192.168.0.0/24'
  }

  server_options = {
    :name => "fog_server_#{Time.now.to_i.to_s}",
    :flavor_id => rackspace_test_flavor_id(service),
    :image_id => rackspace_test_image_id(service)
  }

  tests('virtual_interface') do
    pending if Fog.mocking?
    begin
      @server = service.servers.create server_options
      @network = service.networks.create net_options
      @server.wait_for { ready? }

      model_tests(@server.virtual_interfaces, {:network => @network}, false)

    ensure
      if @server
        @server.destroy
        # wait_for_server_deletion(@server) if @server
        delete_test_network(@network) if @network
      end
    end
  end

end

Version data entries

41 entries across 39 versions & 6 rubygems

Version Path
fog-1.21.0 tests/rackspace/models/compute_v2/virtual_interface_tests.rb