2015-01-05 13:30:43 -05:00
|
|
|
begin
|
|
|
|
require "codeclimate-test-reporter"
|
|
|
|
CodeClimate::TestReporter.start
|
|
|
|
rescue LoadError => e
|
|
|
|
$stderr.puts "not recording test coverage: #{e.inspect}"
|
|
|
|
end
|
2015-01-05 12:11:37 -05:00
|
|
|
|
2014-12-30 17:25:09 -05:00
|
|
|
require File.expand_path('../../lib/fog/aws', __FILE__)
|
|
|
|
|
|
|
|
Bundler.require(:test)
|
|
|
|
|
|
|
|
Excon.defaults.merge!(:debug_request => true, :debug_response => true)
|
|
|
|
|
|
|
|
require File.expand_path(File.join(File.dirname(__FILE__), 'helpers', 'mock_helper'))
|
|
|
|
|
|
|
|
# This overrides the default 600 seconds timeout during live test runs
|
2015-05-08 17:11:58 -04:00
|
|
|
unless Fog.mocking?
|
|
|
|
Fog.timeout = ENV['FOG_TEST_TIMEOUT'] || 2_000
|
2014-12-30 17:25:09 -05:00
|
|
|
Fog::Logger.warning "Setting default fog timeout to #{Fog.timeout} seconds"
|
|
|
|
end
|
|
|
|
|
|
|
|
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
|