Skip to content

Commit

Permalink
riak_test automation for the Ruby client tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksauzz committed Apr 3, 2013
1 parent 5cba5e6 commit 48957cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ distclean: clean
test: all
@./rebar skip_deps=true eunit

test-client: test-clojure test-python test-erlang
test-client: test-clojure test-python test-erlang test-ruby

test-python: test-boto

Expand Down
12 changes: 10 additions & 2 deletions client_tests/ruby/spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'tempfile'

def create_user(name)
response = HTTParty.put("http://localhost:8080/riak-cs/user",
response = HTTParty.put("#{cs_uri}/riak-cs/user",
:body => {
:name => name,
:email => "#{name}@example.com"}.to_json,
Expand All @@ -19,13 +19,21 @@ def s3_conf
{
access_key_id: key_id,
secret_access_key: key_secret,
proxy_uri: "http://localhost:8080",
proxy_uri: cs_uri,
use_ssl: false,
http_read_timeout: 2000,
max_retries: 0
}
end

def cs_uri
"http://localhost:#{cs_port}"
end

def cs_port
ENV['CS_HTTP_PORT'] || 8080
end

def new_mb_temp_file(size)
temp = Tempfile.new 'riakcs-test'
(size*1024*1024).times {|i| temp.write 0}
Expand Down

0 comments on commit 48957cb

Please sign in to comment.