Explorar el Código

Remove unnecessary test for S3 file deletion

S3 does not throw a not-found error when deleting a file that does not exist
Simon Detheridge hace 6 años
padre
commit
d9c9d74994
Se han modificado 1 ficheros con 0 adiciones y 19 borrados
  1. 0 19
      services/filestore/test/unit/js/S3PersistorTests.js

+ 0 - 19
services/filestore/test/unit/js/S3PersistorTests.js

@@ -675,25 +675,6 @@ describe('S3PersistorTests', function() {
         })
       })
     })
-
-    describe('when the file does not exist', function() {
-      let error
-
-      beforeEach(async function() {
-        S3Client.deleteObject = sinon.stub().returns({
-          promise: sinon.stub().rejects(S3NotFoundError)
-        })
-        try {
-          await S3Persistor.promises.deleteFile(bucket, key)
-        } catch (err) {
-          error = err
-        }
-      })
-
-      it('should throw a NotFoundError', function() {
-        expect(error).to.be.an.instanceOf(Errors.NotFoundError)
-      })
-    })
   })
 
   describe('deleteDirectory', function() {