Sha256: 17c76dccb5a75b0558329680e7baa4b5a6abf46e62601c4ae30c2248d762e2e3

Contents?: true

Size: 1.42 KB

Versions: 10

Compression:

Stored size: 1.42 KB

Contents

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

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", "virtualbox", "vmfusion"]

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

10 entries across 10 versions & 4 rubygems

Version Path
fog-nirvanix-1.8.2 tests/helper.rb
fog-nirvanix-1.8.1 tests/helper.rb
fog-1.9.0 tests/helper.rb
fog-maestrodev-1.8.0.20130114204828 tests/helper.rb
fog-maestrodev-1.8.0.20130111070250 tests/helper.rb
fog-maestrodev-1.8.0.20130109172219 tests/helper.rb
fog-sgonyea-1.8.1 tests/helper.rb
fog-1.8.0 tests/helper.rb
fog-maestrodev-1.7.0.20121114190951 tests/helper.rb
fog-1.7.0 tests/helper.rb