Skip to content

Commit

Permalink
fix(auth): pass project id to gax clients (googleapis#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
callmehiphop authored and Praveen Kumar Singh committed Jan 30, 2019
1 parent 76c2b9f commit cfaa407
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,8 @@ export class PubSub {
return;
}
this.projectId = projectId!;
this.options.projectId = projectId!;

this.getClient_(config, callback);
});
return;
Expand Down
1 change: 1 addition & 0 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ describe('PubSub', () => {
pubsub.getClient_(CONFIG, err => {
assert.ifError(err);
assert.strictEqual(pubsub.projectId, PROJECT_ID);
assert.strictEqual(pubsub.options.projectId, PROJECT_ID);
done();
});
});
Expand Down

0 comments on commit cfaa407

Please sign in to comment.