From b190f060619b8b4be091a69540d0b9de30c1fb5a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 29 Jan 2020 11:50:06 +0100 Subject: dashboard/app: fix testing for go1.11 runtime 0. Remove aetest build tag. We don't need it anymore, go test should work. 1. IsDevAppServer does not return true in tests anymore, so don't use it 2. Use a different mechanism to register test/prod config. We don't have aetest tag anymore, so we need something even more dynamic. 3. Fix new golangci-lint warnings: all test files are checked now. Update #1461 --- pkg/gce/gce.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg') diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go index 59731a858..c940bdeaf 100644 --- a/pkg/gce/gce.go +++ b/pkg/gce/gce.go @@ -53,6 +53,11 @@ func NewContext() (*Context, error) { return nil, fmt.Errorf("failed to get a token source: %v", err) } httpClient := oauth2.NewClient(background, tokenSource) + // nolint + // compute.New is deprecated: please use NewService instead. + // To provide a custom HTTP client, use option.WithHTTPClient. + // If you are using google.golang.org/api/googleapis/transport.APIKey, + // use option.WithAPIKey with NewService instead. ctx.computeService, _ = compute.New(httpClient) // Obtain project name, zone and current instance IP address. ctx.ProjectID, err = ctx.getMeta("project/project-id") -- cgit mrf-deployment