Sha256: 51e9d668387dd9f3d7efb74d9be91c8d89198f2121da6435d114df38fe1fa5e1

Contents?: true

Size: 944 Bytes

Versions: 3

Compression:

Stored size: 944 Bytes

Contents

require 'fog'
require 'aruba/cucumber'

Fog.mock! if ENV['RAX_MOCK'] == 'true'

Before do | scenario |
    @aruba_timeout_seconds = 600
    @scenario = File.basename(scenario.file)
    ENV['CASSETTE'] = @scenario

    proxy_options = {
      :connection_options => {
        :proxy => ENV['https_proxy'],
        :ssl_verify_peer => false
      }
    }

    connect_options = {
        :provider             => 'openstack',
        :openstack_username   => ENV['RAX_USERNAME'],
        :openstack_api_key    => ENV['RAX_API_KEY'],
        :version => :v2, # Use Next Gen Cloud Servers
        :openstack_region => ENV['RAX_REGION'].downcase.to_sym
    }
    connect_options.merge!(proxy_options) unless ENV['https_proxy'].nil?
    @compute = Fog::Compute.new(connect_options)
end

Around do | scenario, block |
    Bundler.with_clean_env do
        block.call
    end
end

After('@creates_server') do
    @compute.servers.delete @server_id
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-openstack-provider-0.1.2 features/support/env.rb
vagrant-openstack-provider-0.1.1 features/support/env.rb
vagrant-openstack-provider-0.1 features/support/env.rb