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

Unified Diff: go/src/infra/gae/libs/gae/upstream_errors_test.go

Issue 1230303003: Revert "Refactor current GAE abstraction library to be free of the SDK*" (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: 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 | « go/src/infra/gae/libs/gae/upstream_errors.go ('k') | go/src/infra/gae/libs/gae/upstream_types.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/libs/gae/upstream_errors_test.go
diff --git a/go/src/infra/gae/libs/gae/upstream_errors_test.go b/go/src/infra/gae/libs/gae/upstream_errors_test.go
deleted file mode 100644
index a5a2e8276454482ce4eabd22ab326b6ecfafb037..0000000000000000000000000000000000000000
--- a/go/src/infra/gae/libs/gae/upstream_errors_test.go
+++ /dev/null
@@ -1,60 +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 gae
-
-import (
- "errors"
- "testing"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-type otherMEType []error
-
-func (o otherMEType) Error() string { return "FAIL" }
-
-func TestUpstreamErrors(t *testing.T) {
- t.Parallel()
-
- Convey("Test MultiError", t, func() {
- Convey("nil", func() {
- me := MultiError(nil)
- So(me.Error(), ShouldEqual, "(0 errors)")
- Convey("single", func() {
- So(SingleError(error(me)), ShouldBeNil)
- })
- })
- Convey("one", func() {
- me := MultiError{errors.New("sup")}
- So(me.Error(), ShouldEqual, "sup")
- })
- Convey("two", func() {
- me := MultiError{errors.New("sup"), errors.New("what")}
- So(me.Error(), ShouldEqual, "sup (and 1 other error)")
- })
- Convey("more", func() {
- me := MultiError{errors.New("sup"), errors.New("what"), errors.New("nerds")}
- So(me.Error(), ShouldEqual, "sup (and 2 other errors)")
-
- Convey("single", func() {
- So(SingleError(error(me)), ShouldResemble, errors.New("sup"))
- })
- })
- Convey("convert", func() {
- ome := otherMEType{errors.New("sup")}
- So(FixError(ome), ShouldHaveSameTypeAs, MultiError{})
- })
- })
-
- Convey("FixError passes through", t, func() {
- e := errors.New("unique")
- So(FixError(e), ShouldEqual, e)
- })
-
- Convey("SingleError passes through", t, func() {
- e := errors.New("unique")
- So(SingleError(e), ShouldEqual, e)
- })
-}
« no previous file with comments | « go/src/infra/gae/libs/gae/upstream_errors.go ('k') | go/src/infra/gae/libs/gae/upstream_types.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698