Index: filter/featureBreaker/featurebreaker_test.go |
diff --git a/filter/featureBreaker/featurebreaker_test.go b/filter/featureBreaker/featurebreaker_test.go |
index 491edceb47360796a2bac2e3f0d43906510a4485..1ad8089117b611e1a348c704e4fbfeeb321bac25 100644 |
--- a/filter/featureBreaker/featurebreaker_test.go |
+++ b/filter/featureBreaker/featurebreaker_test.go |
@@ -8,7 +8,7 @@ import ( |
"testing" |
"github.com/luci/gae/impl/memory" |
- "github.com/luci/gae/service/rawdatastore" |
+ "github.com/luci/gae/service/datastore" |
"github.com/luci/luci-go/common/errors" |
. "github.com/smartystreets/goconvey/convey" |
"golang.org/x/net/context" |
@@ -19,36 +19,36 @@ func TestBrokenFeatures(t *testing.T) { |
e := errors.New("default err") |
- cbe := func(expect string) func(rawdatastore.PropertyMap, error) { |
- return func(_ rawdatastore.PropertyMap, err error) { |
+ cbe := func(expect string) func(datastore.PropertyMap, error) { |
+ return func(_ datastore.PropertyMap, err error) { |
So(err.Error(), ShouldContainSubstring, expect) |
} |
} |
- cbn := func(rawdatastore.PropertyMap, error) {} |
+ cbn := func(datastore.PropertyMap, error) {} |
Convey("BrokenFeatures", t, func() { |
c := memory.Use(context.Background()) |
- Convey("Can break rds", func() { |
+ Convey("Can break ds", func() { |
Convey("without a default", func() { |
c, bf := FilterRDS(c, nil) |
- rds := rawdatastore.Get(c) |
- keys := []rawdatastore.Key{rds.NewKey("Wut", "", 1, nil)} |
+ ds := datastore.Get(c) |
+ keys := []datastore.Key{ds.NewKey("Wut", "", 1, nil)} |
Convey("by specifying an error", func() { |
bf.BreakFeatures(e, "GetMulti", "PutMulti") |
- So(rds.GetMulti(keys, cbn), ShouldEqual, e) |
+ So(ds.GetMulti(keys, cbn), ShouldEqual, e) |
Convey("and you can unbreak them as well", func() { |
bf.UnbreakFeatures("GetMulti") |
- err := rds.GetMulti(keys, cbe(rawdatastore.ErrNoSuchEntity.Error())) |
+ err := ds.GetMulti(keys, cbe(datastore.ErrNoSuchEntity.Error())) |
So(err, ShouldBeNil) |
Convey("no broken features at all is a shortcut", func() { |
bf.UnbreakFeatures("PutMulti") |
- err := rds.GetMulti(keys, cbe(rawdatastore.ErrNoSuchEntity.Error())) |
+ err := ds.GetMulti(keys, cbe(datastore.ErrNoSuchEntity.Error())) |
So(err, ShouldBeNil) |
}) |
}) |
@@ -56,17 +56,17 @@ func TestBrokenFeatures(t *testing.T) { |
Convey("Not specifying an error gets you a generic error", func() { |
bf.BreakFeatures(nil, "GetMulti") |
- err := rds.GetMulti(keys, cbn) |
+ err := ds.GetMulti(keys, cbn) |
So(err.Error(), ShouldContainSubstring, `feature "GetMulti" is broken`) |
}) |
}) |
Convey("with a default", func() { |
c, bf := FilterRDS(c, e) |
- rds := rawdatastore.Get(c) |
- keys := []rawdatastore.Key{rds.NewKey("Wut", "", 1, nil)} |
+ ds := datastore.Get(c) |
+ keys := []datastore.Key{ds.NewKey("Wut", "", 1, nil)} |
bf.BreakFeatures(nil, "GetMulti") |
- So(rds.GetMulti(keys, cbn), ShouldEqual, e) |
+ So(ds.GetMulti(keys, cbn), ShouldEqual, e) |
}) |
}) |
}) |