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

Unified Diff: common/auth/auth_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/auth_test.go
diff --git a/common/auth/auth_test.go b/common/auth/auth_test.go
index 5db8fcab8cfdca37fa53df7c99e64a6bbd06ef5c..d26c125ba50351b12ecb25e9dfef010608bd1e14 100644
--- a/common/auth/auth_test.go
+++ b/common/auth/auth_test.go
@@ -5,7 +5,6 @@
package auth
import (
- "fmt"
"io/ioutil"
"math/rand"
"net/http"
@@ -21,6 +20,7 @@ import (
"github.com/luci/luci-go/common/clock/testclock"
"github.com/luci/luci-go/common/data/rand/mathrand"
"github.com/luci/luci-go/common/errors"
+ "github.com/luci/luci-go/common/retry/transient"
. "github.com/luci/luci-go/common/testing/assertions"
. "github.com/smartystreets/goconvey/convey"
@@ -591,7 +591,7 @@ func (p *fakeTokenProvider) RefreshToken(ctx context.Context, prev, base *oauth2
p.baseTokenInRefresh = base
if p.transientRefreshErrors != 0 {
p.transientRefreshErrors--
- return nil, errors.WrapTransient(fmt.Errorf("transient error"))
+ return nil, errors.New("transient error", transient.Tag)
}
if p.revokedCreds {
return nil, internal.ErrBadCredentials
« no previous file with comments | « common/auth/auth.go ('k') | common/auth/internal/common.go » ('j') | common/errors/tags.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698