Skip to content

Commit

Permalink
Use correct URI for Snapshot instances (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus authored Apr 23, 2018
1 parent ffffc67 commit 7be1e8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/google-cloud-compute/src/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ function Snapshot(scope, name) {

var config = {
parent: scope,
baseUrl: '/global/snapshots',
baseUrl:
'https://www.googleapis.com/compute/v1/projects/{{projectId}}/global/snapshots',
/**
* @name Snapshot#id
* @type {string}
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-compute/system-test/compute.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ describe('Compute', function() {
assert.ifError(err);

operation.on('error', done).on('complete', function() {
done();
snapshot.getMetadata(done);
});
});
});
Expand Down
5 changes: 4 additions & 1 deletion packages/google-cloud-compute/test/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ describe('Snapshot', function() {
var calledWith = snapshot.calledWith_[0];

assert.strictEqual(calledWith.parent, COMPUTE);
assert.strictEqual(calledWith.baseUrl, '/global/snapshots');
assert.strictEqual(
calledWith.baseUrl,
'https://www.googleapis.com/compute/v1/projects/{{projectId}}/global/snapshots'
);
assert.strictEqual(calledWith.id, SNAPSHOT_NAME);
assert.deepEqual(calledWith.methods, {
exists: true,
Expand Down

0 comments on commit 7be1e8f

Please sign in to comment.