Skip to content
Browse files

autodetect that s3cmd is not installed

  • Loading branch information...
1 parent ba5e528 commit d061f3cc769e44f46a7715fb7bdd8158a3e0b935 @ngauthier ngauthier committed with Apr 18, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 test/s3cmd_test.rb
View
6 test/s3cmd_test.rb
@@ -1,13 +1,10 @@
require 'test/test_helper'
require 'fileutils'
-# You need to have s3cmd installed to use this
-# Also, s3cmd doesn't support path style requests, so in order to properly test
-# it you need to modify your dns by changing /etc/hosts or using dnsmasq
class S3CmdTest < Test::Unit::TestCase
-
def setup
config = File.expand_path(File.join(File.dirname(__FILE__),'local_s3_cfg'))
+ raise "Please install s3cmd" if `which s3cmd`.empty?
@s3cmd = "s3cmd --config #{config}"
end
@@ -52,5 +49,4 @@ def test_multi_directory
def test_intra_bucket_copy
end
-
end

0 comments on commit d061f3c

Please sign in to comment.
Something went wrong with that request. Please try again.