-
Notifications
You must be signed in to change notification settings - Fork 113
fix: update root url to compute.googleapis.com
#349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests are failing due to a few assertions that don't take into account compute
:
AssertionError [ERR_ASSERTION]: Input A expected to strictly equal input B:
+ expected - actual
- 'https://www.googleapis.com/compute/v1/zones/us-central1-a/machineTypes/n1-standard-2'
+ 'https://compute.googleapis.com/compute/v1/zones/us-central1-a/machineTypes/n1-standard-2'
+ expected - actual
Codecov Report
@@ Coverage Diff @@
## master #349 +/- ##
=======================================
Coverage 99.14% 99.14%
=======================================
Files 20 20
Lines 1524 1524
=======================================
Hits 1511 1511
Misses 13 13
Continue to review full report at Codecov.
|
src/vm.js
Outdated
@@ -249,7 +249,7 @@ class VM extends common.ServiceObject { | |||
this.hasActiveWaiters = false; | |||
this.waiters = []; | |||
this.url = format('{base}/{project}/zones/{zone}/instances/{name}', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just for the benefit of a public API, so that the user can view the url
of the resource that the VM is based on:
it('should localize the URL of the VM', function() {
assert.strictEqual(
vm.url,
[
'https://www.googleapis.com/compute/v1/projects',
COMPUTE.projectId,
'zones',
ZONE.name,
'instances',
VM_NAME,
].join('/')
);
});
This change will update the root url used for requests from
www.googleapis.com
tocompute.googleapis.com
.