Merge pull request #87178 from YuikoTakada/fix_81657_1

Fix static check failures in test/e2e/instrumentation/logging/st…
This commit is contained in:
Kubernetes Prow Robot 2020-01-23 06:00:49 -08:00 committed by GitHub
commit f0486a6b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -40,7 +40,6 @@ pkg/volume/util/subpath
pkg/volume/vsphere_volume pkg/volume/vsphere_volume
test/e2e/apps test/e2e/apps
test/e2e/autoscaling test/e2e/autoscaling
test/e2e/instrumentation/logging/stackdriver
test/integration/deployment test/integration/deployment
test/integration/examples test/integration/examples
test/integration/framework test/integration/framework

View File

@ -25,6 +25,7 @@ go_library(
"//vendor/github.com/onsi/ginkgo:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library",
"//vendor/golang.org/x/oauth2/google:go_default_library", "//vendor/golang.org/x/oauth2/google:go_default_library",
"//vendor/google.golang.org/api/logging/v2beta1:go_default_library", "//vendor/google.golang.org/api/logging/v2beta1:go_default_library",
"//vendor/google.golang.org/api/option:go_default_library",
"//vendor/google.golang.org/api/pubsub/v1:go_default_library", "//vendor/google.golang.org/api/pubsub/v1:go_default_library",
], ],
) )

View File

@ -30,6 +30,7 @@ import (
"golang.org/x/oauth2/google" "golang.org/x/oauth2/google"
sd "google.golang.org/api/logging/v2beta1" sd "google.golang.org/api/logging/v2beta1"
"google.golang.org/api/option"
pubsub "google.golang.org/api/pubsub/v1" pubsub "google.golang.org/api/pubsub/v1"
) )
@ -85,7 +86,8 @@ type sdLogProvider struct {
func newSdLogProvider(f *framework.Framework, scope logProviderScope) (*sdLogProvider, error) { func newSdLogProvider(f *framework.Framework, scope logProviderScope) (*sdLogProvider, error) {
ctx := context.Background() ctx := context.Background()
hc, err := google.DefaultClient(ctx, sd.CloudPlatformScope) hc, err := google.DefaultClient(ctx, sd.CloudPlatformScope)
sdService, err := sd.New(hc) framework.ExpectNoError(err)
sdService, err := sd.NewService(ctx, option.WithHTTPClient(hc))
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -94,7 +96,7 @@ func newSdLogProvider(f *framework.Framework, scope logProviderScope) (*sdLogPro
return nil, err return nil, err
} }
pubsubService, err := pubsub.New(hc) pubsubService, err := pubsub.NewService(ctx, option.WithHTTPClient(hc))
if err != nil { if err != nil {
return nil, err return nil, err
} }