forked from remote/oauth2
google: add utilities supporting upcoming oauth2 functionality
These are used to support some extended utilities to help with STS requests.
Change-Id: Iafc145b06ca42374cfc2ac6572762a50bcf560f2
GitHub-Last-Rev: 3085fe5703
GitHub-Pull-Request: golang/oauth2#439
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/259777
Trust: Cody Oss <codyoss@google.com>
Run-TryBot: Cody Oss <codyoss@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tyler Bui-Palsulich <tbp@google.com>
This commit is contained in:
19
google/internal/externalaccount/err_test.go
Normal file
19
google/internal/externalaccount/err_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright 2020 The Go 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 externalaccount
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestError(t *testing.T) {
|
||||
e := Error{
|
||||
"42",
|
||||
"http:thisIsAPlaceholder",
|
||||
"The Answer!",
|
||||
}
|
||||
want := "got error code 42 from http:thisIsAPlaceholder: The Answer!"
|
||||
if got := e.Error(); got != want {
|
||||
t.Errorf("Got error message %q; want %q", got, want)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user