unit test for s3 failure cases