Skip to content

Commit

Permalink
Delete all files in the bucket before starting
Browse files Browse the repository at this point in the history
  • Loading branch information
ivgiuliani committed Apr 11, 2023
1 parent f637005 commit 13e0c83
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/bucket_store_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
# This is presented as a single idempotent test as otherwise resetting state between execution
# makes things very complicated with no huge benefits.

before do
# Even though we make an effort to delete all files in a bucket after we're
# done, there may be cases when that doesn't happen (e.g. when the test suite fails),
# so we perform an initial cleanup before starting.
described_class.for(base_bucket_uri).list.each do |path|
described_class.for(path).delete!
end
end

it "has a consistent interface" do
# Write 201 files
file_list = []
Expand Down

0 comments on commit 13e0c83

Please sign in to comment.