1
私はGikngoを使用してappengineのテストを書こうとしています。Gikngoテストはgoappテスト中にハングする
次のようにテストのための私のセットアップは次のとおりです。
suite_test.go:私は、我々のテストは一貫タイプのエラーでハング見
BeforeSuite() {
inst, err = aetest.NewInstance(options)
if err != nil {
Fail(fmt.Sprintf("%s", err))
}
}
var(
req *http.Request
ctx context.Context
)
BeforeEach() {
req = inst.NewRequest()
ctx = appengine.NewContext(req)
// Clean up local datastore using the context.
}
validation_test.go
Describe("Some Test", func() {
It("ValidateFoo", func() {
// Access ctx here
})
...
It("ValidateBar", func() {
// Access ctx here.
})
})
:
Expected success, but got an error:
<*url.Error | 0xc8210570b0>: {
Op: "Post",
URL: "http://localhost:59072",
Err: {s: "EOF"},
}
Post http://localhost:59072: EOF
これは、APIサーバーがアクセス不能になったことを示しているようです。しかし、テスト出力はこれを示していないようです。
goappテストをデバッグする方法は何ですか?