Trying to fix specs when run on Travis
This commit is contained in:
parent
9ba85446ef
commit
409628c9e7
@ -32,6 +32,11 @@ test:
|
|||||||
cs_binaries: rs.binaries.test
|
cs_binaries: rs.binaries.test
|
||||||
authorizations: rs_authorizations_test
|
authorizations: rs_authorizations_test
|
||||||
opslog: rs_opslog_test
|
opslog: rs_opslog_test
|
||||||
|
swift:
|
||||||
|
host: "https://swift.example.com"
|
||||||
|
redis:
|
||||||
|
host: localhost
|
||||||
|
port: 6379
|
||||||
|
|
||||||
staging:
|
staging:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
@ -251,7 +251,7 @@ describe "Directories" do
|
|||||||
context "charset given in content-type header" do
|
context "charset given in content-type header" do
|
||||||
before do
|
before do
|
||||||
header "Content-Type", "image/jpeg; charset=binary"
|
header "Content-Type", "image/jpeg; charset=binary"
|
||||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||||
@image = File.open(filename, "r").read
|
@image = File.open(filename, "r").read
|
||||||
put "/jimmy/tasks/jaypeg.jpg", @image
|
put "/jimmy/tasks/jaypeg.jpg", @image
|
||||||
end
|
end
|
||||||
@ -273,7 +273,7 @@ describe "Directories" do
|
|||||||
context "no charset in content-type header" do
|
context "no charset in content-type header" do
|
||||||
before do
|
before do
|
||||||
header "Content-Type", "image/jpeg"
|
header "Content-Type", "image/jpeg"
|
||||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||||
@image = File.open(filename, "r").read
|
@image = File.open(filename, "r").read
|
||||||
put "/jimmy/tasks/jaypeg.jpg", @image
|
put "/jimmy/tasks/jaypeg.jpg", @image
|
||||||
end
|
end
|
||||||
|
@ -446,7 +446,7 @@ describe "App with Riak backend" do
|
|||||||
context "binary charset in content-type header" do
|
context "binary charset in content-type header" do
|
||||||
before do
|
before do
|
||||||
header "Content-Type", "image/jpeg; charset=binary"
|
header "Content-Type", "image/jpeg; charset=binary"
|
||||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||||
@image = File.open(filename, "r").read
|
@image = File.open(filename, "r").read
|
||||||
put "/jimmy/documents/jaypeg", @image
|
put "/jimmy/documents/jaypeg", @image
|
||||||
end
|
end
|
||||||
@ -502,7 +502,7 @@ describe "App with Riak backend" do
|
|||||||
context "overwriting existing file with same file" do
|
context "overwriting existing file with same file" do
|
||||||
before do
|
before do
|
||||||
header "Content-Type", "image/jpeg; charset=binary"
|
header "Content-Type", "image/jpeg; charset=binary"
|
||||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||||
@image = File.open(filename, "r").read
|
@image = File.open(filename, "r").read
|
||||||
put "/jimmy/documents/jaypeg", @image
|
put "/jimmy/documents/jaypeg", @image
|
||||||
end
|
end
|
||||||
@ -518,7 +518,7 @@ describe "App with Riak backend" do
|
|||||||
context "overwriting existing file with different file" do
|
context "overwriting existing file with different file" do
|
||||||
before do
|
before do
|
||||||
header "Content-Type", "image/jpeg; charset=binary"
|
header "Content-Type", "image/jpeg; charset=binary"
|
||||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||||
@image = File.open(filename, "r").read
|
@image = File.open(filename, "r").read
|
||||||
put "/jimmy/documents/jaypeg", @image+"foo"
|
put "/jimmy/documents/jaypeg", @image+"foo"
|
||||||
end
|
end
|
||||||
@ -540,7 +540,7 @@ describe "App with Riak backend" do
|
|||||||
context "no binary charset in content-type header" do
|
context "no binary charset in content-type header" do
|
||||||
before do
|
before do
|
||||||
header "Content-Type", "image/jpeg"
|
header "Content-Type", "image/jpeg"
|
||||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||||
@image = File.open(filename, "r").read
|
@image = File.open(filename, "r").read
|
||||||
put "/jimmy/documents/jaypeg", @image
|
put "/jimmy/documents/jaypeg", @image
|
||||||
end
|
end
|
||||||
@ -705,7 +705,7 @@ describe "App with Riak backend" do
|
|||||||
context "binary data" do
|
context "binary data" do
|
||||||
before do
|
before do
|
||||||
header "Content-Type", "image/jpeg; charset=binary"
|
header "Content-Type", "image/jpeg; charset=binary"
|
||||||
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
|
filename = File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "rockrule.jpeg")
|
||||||
@image = File.open(filename, "r").read
|
@image = File.open(filename, "r").read
|
||||||
put "/jimmy/documents/jaypeg", @image
|
put "/jimmy/documents/jaypeg", @image
|
||||||
|
|
||||||
|
@ -33,13 +33,15 @@ end
|
|||||||
|
|
||||||
alias context describe
|
alias context describe
|
||||||
|
|
||||||
def redis
|
if app.settings.respond_to? :redis
|
||||||
@redis ||= Redis.new(host: app.settings.redis["host"], port: app.settings.redis["port"])
|
def redis
|
||||||
end
|
@redis ||= Redis.new(host: app.settings.redis["host"], port: app.settings.redis["port"])
|
||||||
|
end
|
||||||
|
|
||||||
def purge_redis
|
def purge_redis
|
||||||
redis.keys("rs_*").each do |key|
|
redis.keys("rs_*").each do |key|
|
||||||
redis.del key
|
redis.del key
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user