英文:
Go App Engine - Testing Memcache service failures
问题
我正在尝试测试我的Go GAE应用程序中的失败路径。我正在使用包含的appengine/aetest
包进行测试,该包创建一个dev_appserver.py
子进程来处理API调用,但似乎无法告诉API存根开始失败(它总是正常工作)。
我尝试过的一个有希望的方法是使用withmock来实际模拟memcache包,并使函数返回我想要的一系列错误。不幸的是,我发现withmock
与App Engine不太兼容。
英文:
I am trying to test the failure paths in my Go GAE application. I am testing using the included appengine/aetest
package that creates a dev_appserver.py
subprocess to handle API calls, however it seems impossible to tell the API stub to start failing (it always works).
A promising thing I tried was using withmock to actually mock out the memcache package and make the functions return the series of errors I'd like. Alas I found withmock
is not very compatible with App Engine.
答案1
得分: 1
这听起来像一个很好的功能请求。请在App Engine问题跟踪器上提交一个请求!
英文:
This sounds like a good feature request. Please file one over on the App Engine issue tracker!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论