A few months ago a google.golang.org/appengine commit exposed functionality for intercepting API calls. It would be great if luci/gaes memory backend could plug into this for others to use who are just using the google.golang.org/appengine APIs.
The functionality would go something like this:
import (
"testing"
"golang.org/x/net/context"
"google.golang.org/appengine"
"github.com/luci/gae/impl/memory"
)
func TestCode(t *testing.T) {
ctx := context.Background()
ctx = appengine.WithAPICallFunc(ctx, memory.APICallFunc)
// User test code for example:
if _, err := datastore.Put(ctx, key, entity); err != nil {
t.Fatal(err)
}
}
I thought I would just put it out there – even though I understand it will probably never be on the roadmap. Too many open files errors are driving me crazy so I thought I would do something vaguely positive to try and get off dev_appserver.py for unit testing.
A few months ago a
google.golang.org/appenginecommit exposed functionality for intercepting API calls. It would be great ifluci/gaes memory backend could plug into this for others to use who are just using thegoogle.golang.org/appengineAPIs.The functionality would go something like this:
I thought I would just put it out there – even though I understand it will probably never be on the roadmap. Too many open files errors are driving me crazy so I thought I would do something vaguely positive to try and get off
dev_appserver.pyfor unit testing.