Sha256: dd03c5a0ec27a77a4741a790a660b262209b24e41f831b0bf9c5e279faa00c46
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
Contents
require 'test/test_helper' require 'fileutils' require 'shuck/server' require 'right_aws' class RightAWSCommandsTest < Test::Unit::TestCase def setup @s3 = RightAws::S3Interface.new('1E3GDYEOGFJPIT7XXXXXX','hgTHt68JY07JKUY08ftHYtERkjgtfERn57XXXXXX', {:multi_thread => false, :server => 'localhost', :port => 10453, :protocol => 'http' }) end def teardown end def test_create_bucket bucket = @s3.create_bucket("s3media") assert_not_nil bucket end def test_store @s3.put("s3media","helloworld","Hello World Man!") obj = @s3.get("s3media","helloworld") assert_equal "Hello World Man!",obj[:object] obj = @s3.get("s3media","helloworld", ) end def test_large_store @s3.put("s3media","helloworld","Hello World Man!") buffer = "" 500000.times do buffer << "#{(rand * 100).to_i}" end buf_len = buffer.length @s3.put("s3media","big",buffer) output = "" @s3.get("s3media","big") do |chunk| output << chunk end assert_equal buf_len,output.size end def test_multi_directory @s3.put("s3media","dir/right/123.txt","recursive") output = "" obj = @s3.get("s3media","dir/right/123.txt") do |chunk| output << chunk end assert_equal "recursive", output end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
shuck-0.0.7 | test/right_aws_commands_test.rb |
shuck-0.0.6 | test/right_aws_commands_test.rb |
shuck-0.0.5 | test/right_aws_commands_test.rb |