Index: service/datastore/context_test.go |
diff --git a/service/rawdatastore/context_test.go b/service/datastore/context_test.go |
similarity index 81% |
rename from service/rawdatastore/context_test.go |
rename to service/datastore/context_test.go |
index 391e6f4cef4527da649d39e95a96d2ed903ea446..d22cf947ec33e0cfe0ec40782c6619d611840de5 100644 |
--- a/service/rawdatastore/context_test.go |
+++ b/service/datastore/context_test.go |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-package rawdatastore |
+package datastore |
import ( |
"testing" |
@@ -17,9 +17,9 @@ type fakeInfo struct{ info.Interface } |
func (fakeInfo) GetNamespace() string { return "ns" } |
func (fakeInfo) AppID() string { return "aid" } |
-type fakeService struct{ Interface } |
+type fakeService struct{ RawInterface } |
-type fakeFilt struct{ Interface } |
+type fakeFilt struct{ RawInterface } |
func (fakeFilt) NewKey(kind, stringID string, intID int64, parent Key) Key { |
return NewKey("aid", "ns", kind, stringID, intID, parent) |
@@ -31,18 +31,18 @@ func TestServices(t *testing.T) { |
Convey("Test service interfaces", t, func() { |
c := context.Background() |
Convey("without adding anything", func() { |
- So(Get(c), ShouldBeNil) |
+ So(GetRaw(c), ShouldBeNil) |
}) |
Convey("adding a basic implementation", func() { |
c = Set(info.Set(c, fakeInfo{}), fakeService{}) |
Convey("lets you pull them back out", func() { |
- So(Get(c), ShouldResemble, &checkFilter{fakeService{}, "aid", "ns"}) |
+ So(GetRaw(c), ShouldResemble, &checkFilter{fakeService{}, "aid", "ns"}) |
}) |
Convey("and lets you add filters", func() { |
- c = AddFilters(c, func(ic context.Context, rds Interface) Interface { |
+ c = AddFilters(c, func(ic context.Context, rds RawInterface) RawInterface { |
return fakeFilt{rds} |
}) |