diff --git a/packages/spanner/package.json b/packages/spanner/package.json index 78de2fac64b..f8ad50d9614 100644 --- a/packages/spanner/package.json +++ b/packages/spanner/package.json @@ -40,7 +40,7 @@ "events-intercept": "^2.0.0", "extend": "^3.0.0", "generic-pool": "^3.1.4", - "google-gax": "^0.12.2", + "google-gax": "^0.12.3", "google-proto-files": "^0.10.0", "is": "^3.1.0", "lodash.chunk": "^4.2.0", diff --git a/packages/spanner/src/admin/database/v1/database_admin_client.js b/packages/spanner/src/admin/database/v1/database_admin_client.js index ffdf8c7572f..ac40d7a1c4f 100644 --- a/packages/spanner/src/admin/database/v1/database_admin_client.js +++ b/packages/spanner/src/admin/database/v1/database_admin_client.js @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'spanner.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; var PAGE_DESCRIPTORS = { listDatabases: new gax.PageDescriptor( @@ -65,7 +65,7 @@ var ALL_SCOPES = [ * @see {@link databaseAdminClient} * * @example - * var spannerV1 = require('@google-cloud/spanner').v1.admin.database({ + * var spannerV1 = require('@google-cloud/spanner').admin.database.v1({ * // optional auth parameters. * }); * var client = spannerV1.databaseAdminClient(); @@ -73,32 +73,29 @@ var ALL_SCOPES = [ * @class */ function DatabaseAdminClient(gaxGrpc, grpcClients, opts) { - opts = opts || {}; - var servicePath = opts.servicePath || SERVICE_ADDRESS; - var port = opts.port || DEFAULT_SERVICE_PORT; - var sslCreds = opts.sslCreds || null; - var clientConfig = opts.clientConfig || {}; - var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.version; + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); var googleApiClient = [ - appName + '/' + appVersion, + 'gl-node/' + process.versions.node + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( CODE_GEN_NAME_VERSION, 'gax/' + gax.version, - 'nodejs/' + process.version].join(' '); + 'grpc/' + gaxGrpc.grpcVersion + ); this.operationsClient = new gax.lro({ auth: gaxGrpc.auth, grpc: gaxGrpc.grpc - }).operationsClient({ - servicePath: servicePath, - port: port, - sslCreds: sslCreds, - clientConfig: clientConfig, - appName: appName, - appVersion: appVersion - }); + }).operationsClient(opts); this.longrunningDescriptors = { createDatabase: new gax.LongrunningDescriptor( @@ -114,17 +111,15 @@ function DatabaseAdminClient(gaxGrpc, grpcClients, opts) { var defaults = gaxGrpc.constructSettings( 'google.spanner.admin.database.v1.DatabaseAdmin', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); var self = this; this.auth = gaxGrpc.auth; var databaseAdminStub = gaxGrpc.createStub( - servicePath, - port, grpcClients.google.spanner.admin.database.v1.DatabaseAdmin, - {sslCreds: sslCreds}); + opts); var databaseAdminStubMethods = [ 'listDatabases', 'createDatabase', @@ -285,7 +280,7 @@ DatabaseAdminClient.prototype.getProjectId = function(callback) { * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedParent = client.instancePath("[PROJECT]", "[INSTANCE]"); * // Iterate over all elements. * client.listDatabases({parent: formattedParent}).then(function(responses) { @@ -364,7 +359,7 @@ DatabaseAdminClient.prototype.listDatabases = function(request, options, callbac * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedParent = client.instancePath("[PROJECT]", "[INSTANCE]"); * client.listDatabasesStream({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) @@ -417,7 +412,7 @@ DatabaseAdminClient.prototype.listDatabasesStream = function(request, options) { * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedParent = client.instancePath("[PROJECT]", "[INSTANCE]"); * var createStatement = ''; * var request = { @@ -503,7 +498,7 @@ DatabaseAdminClient.prototype.createDatabase = function(request, options, callba * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedName = client.databasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]"); * client.getDatabase({name: formattedName}).then(function(responses) { * var response = responses[0]; @@ -554,7 +549,7 @@ DatabaseAdminClient.prototype.getDatabase = function(request, options, callback) * {@link longrunning.Operation}: `/operations/`. * * `operation_id` should be unique within the database, and must be - * a valid identifier: `[a-zA-Z][a-zA-Z0-9_]*`. Note that + * a valid identifier: `[a-z][a-z0-9_]*`. Note that * automatically-generated operation IDs always begin with an * underscore. If the named operation already exists, * {@link UpdateDatabaseDdl} returns @@ -572,7 +567,7 @@ DatabaseAdminClient.prototype.getDatabase = function(request, options, callback) * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedDatabase = client.databasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]"); * var statements = []; * var request = { @@ -654,7 +649,7 @@ DatabaseAdminClient.prototype.updateDatabaseDdl = function(request, options, cal * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedDatabase = client.databasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]"); * client.dropDatabase({database: formattedDatabase}).catch(function(err) { * console.error(err); @@ -694,7 +689,7 @@ DatabaseAdminClient.prototype.dropDatabase = function(request, options, callback * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedDatabase = client.databasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]"); * client.getDatabaseDdl({database: formattedDatabase}).then(function(responses) { * var response = responses[0]; @@ -748,7 +743,7 @@ DatabaseAdminClient.prototype.getDatabaseDdl = function(request, options, callba * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedResource = client.databasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]"); * var policy = {}; * var request = { @@ -800,7 +795,7 @@ DatabaseAdminClient.prototype.setIamPolicy = function(request, options, callback * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedResource = client.databasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]"); * client.getIamPolicy({resource: formattedResource}).then(function(responses) { * var response = responses[0]; @@ -853,7 +848,7 @@ DatabaseAdminClient.prototype.getIamPolicy = function(request, options, callback * * @example * - * var client = spannerAdmin.databaseAdminClient(); + * var client = spannerV1.databaseAdminClient(); * var formattedResource = client.databasePath("[PROJECT]", "[INSTANCE]", "[DATABASE]"); * var permissions = []; * var request = { @@ -904,10 +899,6 @@ function DatabaseAdminClientBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ this.databaseAdminClient = function(opts) { return new DatabaseAdminClient(gaxGrpc, databaseAdminClient, opts); diff --git a/packages/spanner/src/admin/database/v1/database_admin_client_config.json b/packages/spanner/src/admin/database/v1/database_admin_client_config.json index efa919a0a7d..bba6763e010 100644 --- a/packages/spanner/src/admin/database/v1/database_admin_client_config.json +++ b/packages/spanner/src/admin/database/v1/database_admin_client_config.json @@ -2,13 +2,13 @@ "interfaces": { "google.spanner.admin.database.v1.DatabaseAdmin": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [ + "UNAVAILABLE" + ] }, "retry_params": { "default": { diff --git a/packages/spanner/src/admin/instance/v1/instance_admin_client.js b/packages/spanner/src/admin/instance/v1/instance_admin_client.js index 48800a0b1bd..0535a5f5432 100644 --- a/packages/spanner/src/admin/instance/v1/instance_admin_client.js +++ b/packages/spanner/src/admin/instance/v1/instance_admin_client.js @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'spanner.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; var PAGE_DESCRIPTORS = { listInstanceConfigs: new gax.PageDescriptor( @@ -85,7 +85,7 @@ var ALL_SCOPES = [ * @see {@link instanceAdminClient} * * @example - * var spannerV1 = require('@google-cloud/spanner').v1.admin.instance({ + * var spannerV1 = require('@google-cloud/spanner').admin.instance.v1({ * // optional auth parameters. * }); * var client = spannerV1.instanceAdminClient(); @@ -93,32 +93,29 @@ var ALL_SCOPES = [ * @class */ function InstanceAdminClient(gaxGrpc, grpcClients, opts) { - opts = opts || {}; - var servicePath = opts.servicePath || SERVICE_ADDRESS; - var port = opts.port || DEFAULT_SERVICE_PORT; - var sslCreds = opts.sslCreds || null; - var clientConfig = opts.clientConfig || {}; - var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.version; + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); var googleApiClient = [ - appName + '/' + appVersion, + 'gl-node/' + process.versions.node + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( CODE_GEN_NAME_VERSION, 'gax/' + gax.version, - 'nodejs/' + process.version].join(' '); + 'grpc/' + gaxGrpc.grpcVersion + ); this.operationsClient = new gax.lro({ auth: gaxGrpc.auth, grpc: gaxGrpc.grpc - }).operationsClient({ - servicePath: servicePath, - port: port, - sslCreds: sslCreds, - clientConfig: clientConfig, - appName: appName, - appVersion: appVersion - }); + }).operationsClient(opts); this.longrunningDescriptors = { createInstance: new gax.LongrunningDescriptor( @@ -134,17 +131,15 @@ function InstanceAdminClient(gaxGrpc, grpcClients, opts) { var defaults = gaxGrpc.constructSettings( 'google.spanner.admin.instance.v1.InstanceAdmin', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); var self = this; this.auth = gaxGrpc.auth; var instanceAdminStub = gaxGrpc.createStub( - servicePath, - port, grpcClients.google.spanner.admin.instance.v1.InstanceAdmin, - {sslCreds: sslCreds}); + opts); var instanceAdminStubMethods = [ 'listInstanceConfigs', 'getInstanceConfig', @@ -319,7 +314,7 @@ InstanceAdminClient.prototype.getProjectId = function(callback) { * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedParent = client.projectPath("[PROJECT]"); * // Iterate over all elements. * client.listInstanceConfigs({parent: formattedParent}).then(function(responses) { @@ -399,7 +394,7 @@ InstanceAdminClient.prototype.listInstanceConfigs = function(request, options, c * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedParent = client.projectPath("[PROJECT]"); * client.listInstanceConfigsStream({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) @@ -436,7 +431,7 @@ InstanceAdminClient.prototype.listInstanceConfigsStream = function(request, opti * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedName = client.instanceConfigPath("[PROJECT]", "[INSTANCE_CONFIG]"); * client.getInstanceConfig({name: formattedName}).then(function(responses) { * var response = responses[0]; @@ -516,7 +511,7 @@ InstanceAdminClient.prototype.getInstanceConfig = function(request, options, cal * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedParent = client.projectPath("[PROJECT]"); * // Iterate over all elements. * client.listInstances({parent: formattedParent}).then(function(responses) { @@ -615,7 +610,7 @@ InstanceAdminClient.prototype.listInstances = function(request, options, callbac * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedParent = client.projectPath("[PROJECT]"); * client.listInstancesStream({parent: formattedParent}).on('data', function(element) { * // doThingsWith(element) @@ -652,7 +647,7 @@ InstanceAdminClient.prototype.listInstancesStream = function(request, options) { * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedName = client.instancePath("[PROJECT]", "[INSTANCE]"); * client.getInstance({name: formattedName}).then(function(responses) { * var response = responses[0]; @@ -736,7 +731,7 @@ InstanceAdminClient.prototype.getInstance = function(request, options, callback) * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedParent = client.projectPath("[PROJECT]"); * var instanceId = ''; * var instance = {}; @@ -872,7 +867,7 @@ InstanceAdminClient.prototype.createInstance = function(request, options, callba * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var instance = {}; * var fieldMask = {}; * var request = { @@ -965,7 +960,7 @@ InstanceAdminClient.prototype.updateInstance = function(request, options, callba * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedName = client.instancePath("[PROJECT]", "[INSTANCE]"); * client.deleteInstance({name: formattedName}).catch(function(err) { * console.error(err); @@ -1016,7 +1011,7 @@ InstanceAdminClient.prototype.deleteInstance = function(request, options, callba * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedResource = client.instancePath("[PROJECT]", "[INSTANCE]"); * var policy = {}; * var request = { @@ -1068,7 +1063,7 @@ InstanceAdminClient.prototype.setIamPolicy = function(request, options, callback * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedResource = client.instancePath("[PROJECT]", "[INSTANCE]"); * client.getIamPolicy({resource: formattedResource}).then(function(responses) { * var response = responses[0]; @@ -1094,7 +1089,7 @@ InstanceAdminClient.prototype.getIamPolicy = function(request, options, callback * * Attempting this RPC on a non-existent Cloud Spanner instance resource will * result in a NOT_FOUND error if the user has `spanner.instances.list` - * permission on the containing Cloud Project. Otherwise returns an + * permission on the containing Google Cloud Project. Otherwise returns an * empty set of permissions. * * @param {Object} request @@ -1121,7 +1116,7 @@ InstanceAdminClient.prototype.getIamPolicy = function(request, options, callback * * @example * - * var client = spannerAdmin.instanceAdminClient(); + * var client = spannerV1.instanceAdminClient(); * var formattedResource = client.instancePath("[PROJECT]", "[INSTANCE]"); * var permissions = []; * var request = { @@ -1172,10 +1167,6 @@ function InstanceAdminClientBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ this.instanceAdminClient = function(opts) { return new InstanceAdminClient(gaxGrpc, instanceAdminClient, opts); diff --git a/packages/spanner/src/admin/instance/v1/instance_admin_client_config.json b/packages/spanner/src/admin/instance/v1/instance_admin_client_config.json index 23dbca4fe65..c438b46bd79 100644 --- a/packages/spanner/src/admin/instance/v1/instance_admin_client_config.json +++ b/packages/spanner/src/admin/instance/v1/instance_admin_client_config.json @@ -2,13 +2,13 @@ "interfaces": { "google.spanner.admin.instance.v1.InstanceAdmin": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [ + "UNAVAILABLE" + ] }, "retry_params": { "default": { diff --git a/packages/spanner/src/index.js b/packages/spanner/src/index.js index 9189541f4d6..f8e8191f7dc 100644 --- a/packages/spanner/src/index.js +++ b/packages/spanner/src/index.js @@ -64,6 +64,11 @@ function Spanner(options) { return new Spanner(options); } + options = extend({}, options, { + libName: 'gccl', + libVersion: require('../package.json').version + }); + this.api = { Database: v1.admin.database(options).databaseAdminClient(options), Instance: v1.admin.instance(options).instanceAdminClient(options), diff --git a/packages/spanner/src/v1/spanner_client.js b/packages/spanner/src/v1/spanner_client.js index d981cdefa7e..98c065eb82c 100644 --- a/packages/spanner/src/v1/spanner_client.js +++ b/packages/spanner/src/v1/spanner_client.js @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'spanner.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; var STREAM_DESCRIPTORS = { executeStreamingSql: new gax.StreamDescriptor(gax.StreamType.SERVER_STREAMING), @@ -70,34 +70,36 @@ var ALL_SCOPES = [ * @class */ function SpannerClient(gaxGrpc, grpcClients, opts) { - opts = opts || {}; - var servicePath = opts.servicePath || SERVICE_ADDRESS; - var port = opts.port || DEFAULT_SERVICE_PORT; - var sslCreds = opts.sslCreds || null; - var clientConfig = opts.clientConfig || {}; - var appName = opts.appName || 'gax'; - var appVersion = opts.appVersion || gax.version; + opts = extend({ + servicePath: SERVICE_ADDRESS, + port: DEFAULT_SERVICE_PORT, + clientConfig: {} + }, opts); var googleApiClient = [ - appName + '/' + appVersion, + 'gl-node/' + process.versions.node + ]; + if (opts.libName && opts.libVersion) { + googleApiClient.push(opts.libName + '/' + opts.libVersion); + } + googleApiClient.push( CODE_GEN_NAME_VERSION, 'gax/' + gax.version, - 'nodejs/' + process.version].join(' '); + 'grpc/' + gaxGrpc.grpcVersion + ); var defaults = gaxGrpc.constructSettings( 'google.spanner.v1.Spanner', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); var self = this; this.auth = gaxGrpc.auth; var spannerStub = gaxGrpc.createStub( - servicePath, - port, grpcClients.google.spanner.v1.Spanner, - {sslCreds: sslCreds}); + opts); var spannerStubMethods = [ 'createSession', 'getSession', @@ -258,10 +260,9 @@ SpannerClient.prototype.getProjectId = function(callback) { * * Cloud Spanner limits the number of sessions that can exist at any given * time; thus, it is a good idea to delete idle and/or unneeded sessions. - * Aside from explicit deletes, Cloud Spanner can delete sessions for - * which no operations are sent for more than an hour, or due to - * internal errors. If a session is deleted, requests to it - * return `NOT_FOUND`. + * Aside from explicit deletes, Cloud Spanner can delete sessions for which no + * operations are sent for more than an hour. If a session is deleted, + * requests to it return `NOT_FOUND`. * * Idle sessions can be kept alive by sending a trivial SQL query * periodically, e.g., `"SELECT 1"`. @@ -944,10 +945,6 @@ function SpannerClientBuilder(gaxGrpc) { * @param {Object=} opts.clientConfig * The customized config to build the call settings. See * {@link gax.constructSettings} for the format. - * @param {number=} opts.appName - * The codename of the calling service. - * @param {String=} opts.appVersion - * The version of the calling service. */ this.spannerClient = function(opts) { return new SpannerClient(gaxGrpc, spannerClient, opts); diff --git a/packages/spanner/src/v1/spanner_client_config.json b/packages/spanner/src/v1/spanner_client_config.json index db4ced68c44..76c56b6880c 100644 --- a/packages/spanner/src/v1/spanner_client_config.json +++ b/packages/spanner/src/v1/spanner_client_config.json @@ -2,13 +2,13 @@ "interfaces": { "google.spanner.v1.Spanner": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [ + "UNAVAILABLE" + ] }, "retry_params": { "default": { diff --git a/packages/spanner/test/index.js b/packages/spanner/test/index.js index 7c76a1eca6f..56d8a87649b 100644 --- a/packages/spanner/test/index.js +++ b/packages/spanner/test/index.js @@ -150,31 +150,37 @@ describe('Spanner', function() { var gaxInstanceClient = {}; var gaxSpannerClient = {}; + var expectedOptions = { + libName: 'gccl', + libVersion: require('../package.json').version, + projectId: OPTIONS.projectId + }; + fakeV1Override = function(options) { - assert.strictEqual(options, OPTIONS); + assert.deepStrictEqual(options, expectedOptions); return { spannerClient: function(options) { - assert.strictEqual(options, OPTIONS); + assert.deepStrictEqual(options, expectedOptions); return gaxSpannerClient; } }; }; fakeV1.admin.database = function(options) { - assert.strictEqual(options, OPTIONS); + assert.deepStrictEqual(options, expectedOptions); return { databaseAdminClient: function(options) { - assert.strictEqual(options, OPTIONS); + assert.deepStrictEqual(options, expectedOptions); return gaxDatabaseClient; } }; }; fakeV1.admin.instance = function(options) { - assert.strictEqual(options, OPTIONS); + assert.deepStrictEqual(options, expectedOptions); return { instanceAdminClient: function(options) { - assert.strictEqual(options, OPTIONS); + assert.deepStrictEqual(options, expectedOptions); return gaxInstanceClient; } };