Update vendored library google.golang.org/api

This commit is contained in:
Alexander Neumann 2018-03-30 12:51:18 +02:00
parent 5b6568875c
commit c0960f538f
363 changed files with 581827 additions and 452273 deletions

View file

@ -15,9 +15,11 @@
package option
import (
"reflect"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"golang.org/x/oauth2/google"
"google.golang.org/api/internal"
"google.golang.org/grpc"
)
@ -46,6 +48,7 @@ func TestApply(t *testing.T) {
WithGRPCConn(conn),
WithUserAgent("ua"),
WithCredentialsFile("service-account.json"),
WithCredentials(&google.DefaultCredentials{ProjectID: "p"}),
WithAPIKey("api-key"),
}
var got internal.DialSettings
@ -57,10 +60,11 @@ func TestApply(t *testing.T) {
UserAgent: "ua",
Endpoint: "https://example.com:443",
GRPCConn: conn,
Credentials: &google.DefaultCredentials{ProjectID: "p"},
CredentialsFile: "service-account.json",
APIKey: "api-key",
}
if !reflect.DeepEqual(got, want) {
if !cmp.Equal(got, want, cmpopts.IgnoreUnexported(grpc.ClientConn{})) {
t.Errorf("\ngot %#v\nwant %#v", got, want)
}
}