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

Unified Diff: common/auth/internal/luci_ctx_test.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: more refactor Created 3 years, 6 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: common/auth/internal/luci_ctx_test.go
diff --git a/common/auth/internal/luci_ctx_test.go b/common/auth/internal/luci_ctx_test.go
index 0ad5c7df33ad69c358ee8e2657b8688f95713c35..036769e4d647d9f2a743128e06c9779a6606266e 100644
--- a/common/auth/internal/luci_ctx_test.go
+++ b/common/auth/internal/luci_ctx_test.go
@@ -16,7 +16,7 @@ import (
"golang.org/x/oauth2"
"github.com/luci/luci-go/common/auth/localauth/rpcs"
- "github.com/luci/luci-go/common/errors"
+ "github.com/luci/luci-go/common/retry/transient"
"github.com/luci/luci-go/lucictx"
. "github.com/luci/luci-go/common/testing/assertions"
@@ -108,7 +108,7 @@ func TestLUCIContextProvider(t *testing.T) {
tok, err := p.MintToken(ctx, nil)
So(tok, ShouldBeNil)
So(err, ShouldErrLike, `local auth - HTTP 500`)
- So(errors.IsTransient(err), ShouldBeTrue)
+ So(transient.Tag.In(err), ShouldBeTrue)
})
Convey("HTTP 403", func() {
@@ -116,7 +116,7 @@ func TestLUCIContextProvider(t *testing.T) {
tok, err := p.MintToken(ctx, nil)
So(tok, ShouldBeNil)
So(err, ShouldErrLike, `local auth - HTTP 403`)
- So(errors.IsTransient(err), ShouldBeFalse)
+ So(transient.Tag.In(err), ShouldBeFalse)
})
Convey("RPC level error", func() {
@@ -129,7 +129,7 @@ func TestLUCIContextProvider(t *testing.T) {
tok, err := p.MintToken(ctx, nil)
So(tok, ShouldBeNil)
So(err, ShouldErrLike, `local auth - RPC code 123: omg, error`)
- So(errors.IsTransient(err), ShouldBeFalse)
+ So(transient.Tag.In(err), ShouldBeFalse)
})
})
}

Powered by Google App Engine
This is Rietveld 408576698