Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: go/src/infra/gae/libs/gae/filters/count/count_test.go

Issue 1227203004: Convert 'Testable' interface into an optional filter. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@add_filters
Patch Set: final rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: go/src/infra/gae/libs/gae/filters/count/count_test.go
diff --git a/go/src/infra/gae/libs/gae/filters/count/count_test.go b/go/src/infra/gae/libs/gae/filters/count/count_test.go
index d57a34c4df1f567cb35c12a39d43924f52b34343..f8950c745d0e5602e98d94fc00bb48033de23e3b 100644
--- a/go/src/infra/gae/libs/gae/filters/count/count_test.go
+++ b/go/src/infra/gae/libs/gae/filters/count/count_test.go
@@ -10,6 +10,7 @@ import (
"testing"
"infra/gae/libs/gae"
+ "infra/gae/libs/gae/filters/featureBreaker"
"infra/gae/libs/gae/memory"
. "github.com/smartystreets/goconvey/convey"
@@ -98,13 +99,15 @@ func TestCount(t *testing.T) {
})
Convey("works for global info", t, func() {
- c, ctr := FilterGI(memory.Use(context.Background()))
+ c, fb := featureBreaker.FilterGI(memory.Use(context.Background()), nil)
+ c, ctr := FilterGI(c)
So(c, ShouldNotBeNil)
So(ctr, ShouldNotBeNil)
+
gi := gae.GetGI(c)
gi.Namespace("foo")
- gae.GetGIUnfiltered(c).(gae.Testable).BreakFeatures(nil, "Namespace")
+ fb.BreakFeatures(nil, "Namespace")
gi.Namespace("boom")
So(ctr.Namespace, ShouldResemble, Entry{1, 1})

Powered by Google App Engine
This is Rietveld 408576698