Sha256: e4cb0e7f9a31e54faad6d5cfd1116ad70041286f2c09ab262c8d66ca193f27dc

Contents?: true

Size: 1.83 KB

Versions: 39

Compression:

Stored size: 1.83 KB

Contents

require 'simplecov'

if ENV['COVERAGE'] != 'false' && RUBY_VERSION != "1.9.2"
  require 'coveralls'
  SimpleCov.command_name "shindo:#{Process.pid.to_s}"
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
    SimpleCov::Formatter::HTMLFormatter,
    Coveralls::SimpleCov::Formatter
  ]
  SimpleCov.merge_timeout 3600
  SimpleCov.start
end

ENV['FOG_RC']         = ENV['FOG_RC'] || File.expand_path('../.fog', __FILE__)
ENV['FOG_CREDENTIAL'] = ENV['FOG_CREDENTIAL'] || 'default'

require 'fog'
require 'fog/bin' # for available_providers and registered_providers

Excon.defaults.merge!(:debug_request => true, :debug_response => true)

require File.expand_path(File.join(File.dirname(__FILE__), 'helpers', 'mock_helper'))

def lorem_file
  File.open(File.dirname(__FILE__) + '/lorem.txt', 'r')
end

def array_differences(array_a, array_b)
  (array_a - array_b) | (array_b - array_a)
end

# check to see which credentials are available and add others to the skipped tags list
all_providers = Fog.registered_providers.map {|provider| provider.downcase}

# Manually remove these providers since they are local applications, not lacking credentials
all_providers = all_providers - ["libvirt", "vmfusion", "openvz"]

available_providers = Fog.available_providers.map {|provider| provider.downcase}

unavailable_providers = all_providers - available_providers

for provider in unavailable_providers
  Formatador.display_line("[yellow]Skipping tests for [bold]#{provider}[/] [yellow]due to lacking credentials (add some to '#{Fog.credentials_path}' to run them)[/]")
  Thread.current[:tags] << ('-' << provider)
end

# mark libvirt tests pending if not setup
begin
  require('ruby-libvirt')
rescue LoadError
  Formatador.display_line("[yellow]Skipping tests for [bold]libvirt[/] [yellow]due to missing `ruby-libvirt` gem.[/]")
  Thread.current[:tags] << '-libvirt'
end

Version data entries

39 entries across 39 versions & 3 rubygems

Version Path
fog-maestrodev-1.19.0.20140212012611 tests/helper.rb
fog-maestrodev-1.19.0.20140110004459 tests/helper.rb
fog-maestrodev-1.19.0.20140110003812 tests/helper.rb
fog-maestrodev-1.19.0.20140109202555 tests/helper.rb
fog-maestrodev-1.19.0.20140107192102 tests/helper.rb
fog-maestrodev-1.19.0.20140107142106 tests/helper.rb
fog-maestrodev-1.19.0.20131219203941 tests/helper.rb
fog-maestrodev-1.18.0.20131219193542 tests/helper.rb
fog-1.19.0 tests/helper.rb
fog-maestrodev-1.18.0.20131219033443 tests/helper.rb
fog-maestrodev-1.18.0.20131219032002 tests/helper.rb
fog-maestrodev-1.18.0.20131219030716 tests/helper.rb
fog-maestrodev-1.18.0.20131219022322 tests/helper.rb
fog-maestrodev-1.18.0.20131218202447 tests/helper.rb
fog-maestrodev-1.18.0.20131209091424 tests/helper.rb
fog-maestrodev-1.18.0.20131209090811 tests/helper.rb
fog-maestrodev-1.18.0.20131206115947 tests/helper.rb
fog-maestrodev-1.18.0.20131205181604 tests/helper.rb
fog-maestrodev-1.18.0.20131127194823 tests/helper.rb
fog-maestrodev-1.18.0.20131126183714 tests/helper.rb