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

Unified Diff: filters/featureBreaker/featurebreaker_test.go

Issue 1247283003: Improve docs (Closed) Base URL: https://github.com/luci/gae.git@reduce_size
Patch Set: fix comments 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
« no previous file with comments | « filters/featureBreaker/featurebreaker.go ('k') | filters/featureBreaker/gi.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filters/featureBreaker/featurebreaker_test.go
diff --git a/filters/featureBreaker/featurebreaker_test.go b/filters/featureBreaker/featurebreaker_test.go
deleted file mode 100644
index 241e12896daa12f48bf25c247d027f7456c9ff04..0000000000000000000000000000000000000000
--- a/filters/featureBreaker/featurebreaker_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package featureBreaker
-
-import (
- "errors"
- "testing"
-
- "golang.org/x/net/context"
-
- "github.com/luci/gae/impl/memory"
- "github.com/luci/gae/service/rawdatastore"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func TestBrokenFeatures(t *testing.T) {
- t.Parallel()
-
- e := errors.New("default err")
-
- Convey("BrokenFeatures", t, func() {
- c := memory.Use(context.Background())
-
- Convey("Can break rds", func() {
- Convey("without a default", func() {
- c, bf := FilterRDS(c, nil)
- rds := rawdatastore.Get(c)
-
- Convey("by specifying an error", func() {
- bf.BreakFeatures(e, "Get", "Put")
- So(rds.Get(nil, nil), ShouldEqual, e)
-
- Convey("and you can unbreak them as well", func() {
- bf.UnbreakFeatures("Get")
- So(rds.Get(nil, nil), ShouldEqual, rawdatastore.ErrInvalidKey)
-
- Convey("no broken features at all is a shortcut", func() {
- bf.UnbreakFeatures("Put")
- So(rds.Get(nil, nil), ShouldEqual, rawdatastore.ErrInvalidKey)
- })
- })
- })
-
- Convey("Not specifying an error gets you a generic error", func() {
- bf.BreakFeatures(nil, "Get")
- So(rds.Get(nil, nil).Error(), ShouldEqual, `feature "Get" is broken`)
- })
- })
-
- Convey("with a default", func() {
- c, bf := FilterRDS(c, e)
- rds := rawdatastore.Get(c)
- bf.BreakFeatures(nil, "Get")
- So(rds.Get(nil, nil), ShouldEqual, e)
- })
- })
- })
-}
« no previous file with comments | « filters/featureBreaker/featurebreaker.go ('k') | filters/featureBreaker/gi.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698