File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ func (w *DefaultChunkUtils) WriteChunked(
4343 // Clear the directory if it already exists
4444 err = w .Server .Remove (ctx , dir , address )
4545 if err != nil {
46- return nil
46+ err = fmt .Errorf ("unable to clear directory before writing: %w" , err )
47+ return
4748 }
4849
4950 // Write an `info.json` to the directory
Original file line number Diff line number Diff line change @@ -726,6 +726,15 @@ func (s *S3IntegrationSuite) TestPopulateServerSetHangChunked(c *check.C) {
726726 }
727727 c .Assert (err , check .IsNil )
728728 defer func () {
729+
730+ resp , s3Err := s3Svc .ListObjects (ctx , & s3.ListObjectsV2Input {Bucket : aws .String (bucket )})
731+ c .Assert (s3Err , check .IsNil )
732+
733+ for _ , obj := range resp .Contents {
734+ _ , delErr := s3Svc .DeleteObject (ctx , & s3.DeleteObjectInput {Bucket : aws .String (bucket ), Key : obj .Key })
735+ c .Assert (delErr , check .IsNil )
736+ }
737+
729738 _ , deleteErr := s3Svc .DeleteBucket (ctx , & s3.DeleteBucketInput {Bucket : aws .String (bucket )})
730739 c .Assert (deleteErr , check .IsNil )
731740 }()
You can’t perform that action at this time.
0 commit comments