Index: impl/memory/datastore_test.go |
diff --git a/impl/memory/datastore_test.go b/impl/memory/datastore_test.go |
index 0c1e39a2706bd0145c1fd19bd1a83b6b9f8da93a..a95832ff71ef97de1210ffdf5edd29cbd0b97500 100644 |
--- a/impl/memory/datastore_test.go |
+++ b/impl/memory/datastore_test.go |
@@ -12,6 +12,7 @@ import ( |
dsS "github.com/luci/gae/service/datastore" |
"github.com/luci/gae/service/datastore/serialize" |
infoS "github.com/luci/gae/service/info" |
+ . "github.com/luci/luci-go/common/testing/assertions" |
. "github.com/smartystreets/goconvey/convey" |
"golang.org/x/net/context" |
) |
@@ -513,6 +514,20 @@ func TestDatastoreSingleReadWriter(t *testing.T) { |
So(count, ShouldEqual, 6) |
}) |
}) |
+ |
+ Convey("Testable.DisableSpecialEntities", func() { |
+ ds.Testable().DisableSpecialEntities(true) |
+ |
+ So(ds.Put(&Foo{}), ShouldErrLike, "allocateIDs is disabled") |
+ |
+ So(ds.Put(&Foo{ID: 1}), ShouldBeNil) |
+ |
+ ds.Testable().CatchupIndexes() |
+ |
+ count, err := ds.Count(dsS.NewQuery("")) |
+ So(err, ShouldBeNil) |
+ So(count, ShouldEqual, 1) // normally this would include __entity_group__ |
+ }) |
}) |
} |