如何模拟亚马逊S3在集成测试 [英] How to mock Amazon S3 in an integration test
问题描述
我试图得到一个行走的骨架我的应用程序了,它将使用S3的持久性。我想用一个假的S3服务,让每个开发人员的桌面上可以读/写的意愿。
I'm trying to get an "walking skeleton" of my app up that will use S3 for persistence. I would like to use a fake S3 service so each developer's desktop can read/write at will.
我想 mocks3 将是完美的,因为我可以得到一个码头服务器在我的JUnit测试。的问题是,mocks3不允许任何的写入的。甚至不设置它,据我可以告诉。
I thought mocks3 would be perfect, as I could get a jetty server up in my jUnit tests. The problem is that mocks3 doesn't allow any writes. Not even to set it up as far as I can tell.
那么,如何别人做到这一点?
So how do others do this?
推荐答案
旋风,一个python的web框架,有一个示例应用程序是你要找的东西。
Tornado, a python web framework, has an example app that is just what you're looking for.
https://github.com/facebook/tornado/ BLOB /主/演示/ s3server / s3server.py
可以使用现成的。
这篇关于如何模拟亚马逊S3在集成测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!