diff --git a/spec/bucket_store_integration_spec.rb b/spec/bucket_store_integration_spec.rb index c808615..83d5d76 100644 --- a/spec/bucket_store_integration_spec.rb +++ b/spec/bucket_store_integration_spec.rb @@ -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 = []