jubos / fake-s3

A lightweight server clone of Amazon S3 that simulates most of the commands supported by S3 with minimal dependencies
2.94k stars 355 forks source link

Can you document a little better how to run the tests? #222

Open djangofan opened 6 years ago

djangofan commented 6 years ago

Can you document a little better how to run the tests? I don't know much about running tests implemented using Test::Unit::TestCase . I tried running various test/*rb files but I get errors that look like this, and I don't know why. Your README suggests this should work out of the box. I was trying to run tests against a fake-s3 Docker image on port 4569 .

Here is what I get:

~/workspace/fake-s3 $ bundle install  (this command works fine)
~/workspace/fake-s3 $ ruby -Itest test/s3_commands_test.rb
/Users/me/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- test/test_helper (LoadError)
    from /Users/me/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from test/s3_commands_test.rb:1:in `<main>'
jubos commented 6 years ago

The best way right now is to just run "rake test" once you have a test server running. I agree that the documentation can be improved. Let's leave this issue open until there is a better story around running individual tests.