Skip to content

Commit

Permalink
feat: support apiEndpoint override in client constructor (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jun 5, 2019
1 parent 1806d80 commit 238f3a2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-redis/src/v1/cloud_redis_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class CloudRedisClient {
* API remote host.
*/
constructor(opts) {
opts = opts || {};
this._descriptors = {};

const servicePath =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class CloudRedisClient {
* API remote host.
*/
constructor(opts) {
opts = opts || {};
this._descriptors = {};

const servicePath =
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-redis/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-04T19:40:52.868638Z",
"updateTime": "2019-06-05T11:12:08.959832Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.23.0",
"dockerImage": "googleapis/artman@sha256:846102ebf7ea2239162deea69f64940443b4147f7c2e68d64b332416f74211ba"
"version": "0.23.1",
"dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "0026f4b890ed9e2388fb0573c0727defa6f5b82e",
"internalRef": "251265049"
"sha": "4f3516a6f96dac182973a3573ff5117e8e4f76c7",
"internalRef": "251559960"
}
},
{
Expand Down
5 changes: 5 additions & 0 deletions packages/google-cloud-redis/test/gapic-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ describe('CloudRedisClient', () => {
assert(typeof port === 'number');
});

it('should create a client with no options', () => {
const client = new redisModule.v1.CloudRedisClient();
assert(client);
});

describe('listInstances', () => {
it('invokes listInstances without error', done => {
const client = new redisModule.v1.CloudRedisClient({
Expand Down
5 changes: 5 additions & 0 deletions packages/google-cloud-redis/test/gapic-v1beta1.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ describe('CloudRedisClient', () => {
assert(typeof port === 'number');
});

it('should create a client with no options', () => {
const client = new redisModule.v1beta1.CloudRedisClient();
assert(client);
});

describe('listInstances', () => {
it('invokes listInstances without error', done => {
const client = new redisModule.v1beta1.CloudRedisClient({
Expand Down

0 comments on commit 238f3a2

Please sign in to comment.