aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gce
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-01-29 11:50:06 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-01-29 16:01:06 +0100
commitb190f060619b8b4be091a69540d0b9de30c1fb5a (patch)
treed87e3601f31fa5229424ea2daeab1ee4dbeb2e6d /pkg/gce
parent47055498006c05e81c1e1ad9101d6b8c6f502064 (diff)
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
Diffstat (limited to 'pkg/gce')
-rw-r--r--pkg/gce/gce.go5
1 files changed, 5 insertions, 0 deletions
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")