Closed Junkern closed 6 years ago
I created a test for this scenario in #92, seems to work.. If you have anything to add please do so ☺️ Otherwise I am going to close this issue
The test added in #92 is just a copy of the previous test, it doesn't test anything new. A test for this scenario should fail if there are other files in the response that don't match the prefix.
It actually tests the method @Junkern mentioned. Since it is not failing this is actually not an issue (anymore)?
Edit: Also I do not like the fact that different test can affect each other.
I don't have my original setup at hand at the moment, so I can't verify whether it works or not. But if the tests are running it seems to be fine?
Regarding the fact that tests affect each other:
I would use beforeEach
to spin up the s3rver
and close it in afterEach
. That will lead to longer running tests, but then each it
is running isolated. However, for that the cleanup should also clean up the file system (so we don't end up) creating the files n-times. And for that #58 is probably helpful.
Seems like the tests in #92 pass even after adding checks for files not matching the prefix. Will merge it and close this.
When calling
this.s3Client.listObjectsV2({Bucket: 'baseBucket', Prefix: 'pending'})
the following is returned:Although I indicated a Prefix
pending
, keys which start withrecipes
are included.