diff --git a/packages/google-cloud-memorystore/src/index.ts b/packages/google-cloud-memorystore/src/index.ts index b09116799853..20b9ceed07a5 100644 --- a/packages/google-cloud-memorystore/src/index.ts +++ b/packages/google-cloud-memorystore/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2026 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-memorystore/src/v1/memorystore_client.ts b/packages/google-cloud-memorystore/src/v1/memorystore_client.ts index 6195f5c20a84..9b61ccff7c3a 100644 --- a/packages/google-cloud-memorystore/src/v1/memorystore_client.ts +++ b/packages/google-cloud-memorystore/src/v1/memorystore_client.ts @@ -115,12 +115,6 @@ export class MemorystoreClient { this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). - if (!opts) { - opts = {fallback: true}; - } else { - opts.fallback = opts.fallback ?? true; - } const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); diff --git a/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts b/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts index 6e2e0e1660f7..b845543e5e79 100644 --- a/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts +++ b/packages/google-cloud-memorystore/src/v1beta/memorystore_client.ts @@ -115,12 +115,6 @@ export class MemorystoreClient { this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute). - if (!opts) { - opts = {fallback: true}; - } else { - opts.fallback = opts.fallback ?? true; - } const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); diff --git a/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts b/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts index ecec9826af2c..00f5345dd201 100644 --- a/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts +++ b/packages/google-cloud-memorystore/test/gapic_memorystore_v1.ts @@ -20,12 +20,12 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import {describe, it, beforeEach, afterEach} from 'mocha'; +import {describe, it} from 'mocha'; import * as memorystoreModule from '../src'; import {PassThrough} from 'stream'; -import {GoogleAuth, protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -116,17 +116,6 @@ function stubAsyncIterationCall(responses?: ResponseType[], error? } describe('v1.MemorystoreClient', () => { - let googleAuth: GoogleAuth; - beforeEach(() => { - googleAuth = { - getClient: sinon.stub().resolves({ - getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), - }) - } as unknown as GoogleAuth; - }); - afterEach(() => { - sinon.restore(); - }); describe('Common methods', () => { it('has apiEndpoint', () => { const client = new memorystoreModule.v1.MemorystoreClient(); @@ -222,7 +211,7 @@ describe('v1.MemorystoreClient', () => { it('has initialize method and supports deferred initialization', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); assert.strictEqual(client.memorystoreStub, undefined); @@ -232,7 +221,7 @@ describe('v1.MemorystoreClient', () => { it('has close method for the initialized client', done => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize().catch(err => {throw err}); @@ -244,7 +233,7 @@ describe('v1.MemorystoreClient', () => { it('has close method for the non-initialized client', done => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); assert.strictEqual(client.memorystoreStub, undefined); @@ -256,7 +245,7 @@ describe('v1.MemorystoreClient', () => { it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); @@ -268,7 +257,7 @@ describe('v1.MemorystoreClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); @@ -289,7 +278,7 @@ describe('v1.MemorystoreClient', () => { describe('getInstance', () => { it('invokes getInstance without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -316,7 +305,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getInstance without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -354,7 +343,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getInstance with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -378,7 +367,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getInstance with closed client', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -397,7 +386,7 @@ describe('v1.MemorystoreClient', () => { describe('getCertificateAuthority', () => { it('invokes getCertificateAuthority without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -424,7 +413,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getCertificateAuthority without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -462,7 +451,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getCertificateAuthority with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -486,7 +475,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getCertificateAuthority with closed client', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -505,7 +494,7 @@ describe('v1.MemorystoreClient', () => { describe('getSharedRegionalCertificateAuthority', () => { it('invokes getSharedRegionalCertificateAuthority without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -532,7 +521,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getSharedRegionalCertificateAuthority without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -570,7 +559,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getSharedRegionalCertificateAuthority with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -594,7 +583,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getSharedRegionalCertificateAuthority with closed client', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -613,7 +602,7 @@ describe('v1.MemorystoreClient', () => { describe('getBackupCollection', () => { it('invokes getBackupCollection without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -640,7 +629,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getBackupCollection without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -678,7 +667,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getBackupCollection with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -702,7 +691,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getBackupCollection with closed client', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -721,7 +710,7 @@ describe('v1.MemorystoreClient', () => { describe('getBackup', () => { it('invokes getBackup without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -748,7 +737,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getBackup without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -786,7 +775,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getBackup with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -810,7 +799,7 @@ describe('v1.MemorystoreClient', () => { it('invokes getBackup with closed client', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -829,7 +818,7 @@ describe('v1.MemorystoreClient', () => { describe('createInstance', () => { it('invokes createInstance without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -857,7 +846,7 @@ describe('v1.MemorystoreClient', () => { it('invokes createInstance without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -898,7 +887,7 @@ describe('v1.MemorystoreClient', () => { it('invokes createInstance with call error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -922,7 +911,7 @@ describe('v1.MemorystoreClient', () => { it('invokes createInstance with LRO error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -947,7 +936,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkCreateInstanceProgress without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -967,7 +956,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkCreateInstanceProgress with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -983,7 +972,7 @@ describe('v1.MemorystoreClient', () => { describe('updateInstance', () => { it('invokes updateInstance without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1012,7 +1001,7 @@ describe('v1.MemorystoreClient', () => { it('invokes updateInstance without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1054,7 +1043,7 @@ describe('v1.MemorystoreClient', () => { it('invokes updateInstance with call error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1079,7 +1068,7 @@ describe('v1.MemorystoreClient', () => { it('invokes updateInstance with LRO error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1105,7 +1094,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkUpdateInstanceProgress without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1125,7 +1114,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkUpdateInstanceProgress with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1141,7 +1130,7 @@ describe('v1.MemorystoreClient', () => { describe('deleteInstance', () => { it('invokes deleteInstance without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1169,7 +1158,7 @@ describe('v1.MemorystoreClient', () => { it('invokes deleteInstance without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1210,7 +1199,7 @@ describe('v1.MemorystoreClient', () => { it('invokes deleteInstance with call error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1234,7 +1223,7 @@ describe('v1.MemorystoreClient', () => { it('invokes deleteInstance with LRO error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1259,7 +1248,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkDeleteInstanceProgress without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1279,7 +1268,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkDeleteInstanceProgress with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1295,7 +1284,7 @@ describe('v1.MemorystoreClient', () => { describe('rescheduleMaintenance', () => { it('invokes rescheduleMaintenance without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1323,7 +1312,7 @@ describe('v1.MemorystoreClient', () => { it('invokes rescheduleMaintenance without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1364,7 +1353,7 @@ describe('v1.MemorystoreClient', () => { it('invokes rescheduleMaintenance with call error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1388,7 +1377,7 @@ describe('v1.MemorystoreClient', () => { it('invokes rescheduleMaintenance with LRO error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1413,7 +1402,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkRescheduleMaintenanceProgress without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1433,7 +1422,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkRescheduleMaintenanceProgress with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1449,7 +1438,7 @@ describe('v1.MemorystoreClient', () => { describe('deleteBackup', () => { it('invokes deleteBackup without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1477,7 +1466,7 @@ describe('v1.MemorystoreClient', () => { it('invokes deleteBackup without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1518,7 +1507,7 @@ describe('v1.MemorystoreClient', () => { it('invokes deleteBackup with call error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1542,7 +1531,7 @@ describe('v1.MemorystoreClient', () => { it('invokes deleteBackup with LRO error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1567,7 +1556,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkDeleteBackupProgress without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1587,7 +1576,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkDeleteBackupProgress with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1603,7 +1592,7 @@ describe('v1.MemorystoreClient', () => { describe('exportBackup', () => { it('invokes exportBackup without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1631,7 +1620,7 @@ describe('v1.MemorystoreClient', () => { it('invokes exportBackup without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1672,7 +1661,7 @@ describe('v1.MemorystoreClient', () => { it('invokes exportBackup with call error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1696,7 +1685,7 @@ describe('v1.MemorystoreClient', () => { it('invokes exportBackup with LRO error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1721,7 +1710,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkExportBackupProgress without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1741,7 +1730,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkExportBackupProgress with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1757,7 +1746,7 @@ describe('v1.MemorystoreClient', () => { describe('backupInstance', () => { it('invokes backupInstance without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1785,7 +1774,7 @@ describe('v1.MemorystoreClient', () => { it('invokes backupInstance without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1826,7 +1815,7 @@ describe('v1.MemorystoreClient', () => { it('invokes backupInstance with call error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1850,7 +1839,7 @@ describe('v1.MemorystoreClient', () => { it('invokes backupInstance with LRO error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1875,7 +1864,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkBackupInstanceProgress without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1895,7 +1884,7 @@ describe('v1.MemorystoreClient', () => { it('invokes checkBackupInstanceProgress with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2085,7 +2074,7 @@ describe('v1.MemorystoreClient', () => { it('uses async iteration with listInstances without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2330,7 +2319,7 @@ describe('v1.MemorystoreClient', () => { it('uses async iteration with listBackupCollections without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2575,7 +2564,7 @@ describe('v1.MemorystoreClient', () => { it('uses async iteration with listBackups without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2645,7 +2634,7 @@ describe('v1.MemorystoreClient', () => { describe('getLocation', () => { it('invokes getLocation without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2672,7 +2661,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes getLocation without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2714,7 +2703,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes getLocation with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2740,7 +2729,7 @@ describe('v1.MemorystoreClient', () => { describe('listLocationsAsync', () => { it('uses async iteration with listLocations without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2811,7 +2800,7 @@ describe('v1.MemorystoreClient', () => { describe('getOperation', () => { it('invokes getOperation without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2830,7 +2819,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes getOperation without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -2862,7 +2851,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes getOperation with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -2878,7 +2867,7 @@ describe('v1.MemorystoreClient', () => { describe('cancelOperation', () => { it('invokes cancelOperation without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2897,7 +2886,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes cancelOperation without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -2929,7 +2918,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes cancelOperation with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -2945,7 +2934,7 @@ describe('v1.MemorystoreClient', () => { describe('deleteOperation', () => { it('invokes deleteOperation without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -2964,7 +2953,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes deleteOperation without error using callback', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -2996,7 +2985,7 @@ describe('v1.MemorystoreClient', () => { }); it('invokes deleteOperation with error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -3012,7 +3001,7 @@ describe('v1.MemorystoreClient', () => { describe('listOperationsAsync', () => { it('uses async iteration with listOperations without error', async () => { const client = new memorystoreModule.v1.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( diff --git a/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts b/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts index e9894ab9d306..fbf237f5b4b7 100644 --- a/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts +++ b/packages/google-cloud-memorystore/test/gapic_memorystore_v1beta.ts @@ -20,12 +20,12 @@ import * as protos from '../protos/protos'; import * as assert from 'assert'; import * as sinon from 'sinon'; import {SinonStub} from 'sinon'; -import {describe, it, beforeEach, afterEach} from 'mocha'; +import {describe, it} from 'mocha'; import * as memorystoreModule from '../src'; import {PassThrough} from 'stream'; -import {GoogleAuth, protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -116,17 +116,6 @@ function stubAsyncIterationCall(responses?: ResponseType[], error? } describe('v1beta.MemorystoreClient', () => { - let googleAuth: GoogleAuth; - beforeEach(() => { - googleAuth = { - getClient: sinon.stub().resolves({ - getRequestHeaders: sinon.stub().resolves({Authorization: 'Bearer SOME_TOKEN'}), - }) - } as unknown as GoogleAuth; - }); - afterEach(() => { - sinon.restore(); - }); describe('Common methods', () => { it('has apiEndpoint', () => { const client = new memorystoreModule.v1beta.MemorystoreClient(); @@ -222,7 +211,7 @@ describe('v1beta.MemorystoreClient', () => { it('has initialize method and supports deferred initialization', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); assert.strictEqual(client.memorystoreStub, undefined); @@ -232,7 +221,7 @@ describe('v1beta.MemorystoreClient', () => { it('has close method for the initialized client', done => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize().catch(err => {throw err}); @@ -244,7 +233,7 @@ describe('v1beta.MemorystoreClient', () => { it('has close method for the non-initialized client', done => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); assert.strictEqual(client.memorystoreStub, undefined); @@ -256,7 +245,7 @@ describe('v1beta.MemorystoreClient', () => { it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); @@ -268,7 +257,7 @@ describe('v1beta.MemorystoreClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); @@ -289,7 +278,7 @@ describe('v1beta.MemorystoreClient', () => { describe('getInstance', () => { it('invokes getInstance without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -316,7 +305,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getInstance without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -354,7 +343,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getInstance with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -378,7 +367,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getInstance with closed client', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -397,7 +386,7 @@ describe('v1beta.MemorystoreClient', () => { describe('getCertificateAuthority', () => { it('invokes getCertificateAuthority without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -424,7 +413,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getCertificateAuthority without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -462,7 +451,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getCertificateAuthority with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -486,7 +475,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getCertificateAuthority with closed client', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -505,7 +494,7 @@ describe('v1beta.MemorystoreClient', () => { describe('getSharedRegionalCertificateAuthority', () => { it('invokes getSharedRegionalCertificateAuthority without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -532,7 +521,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getSharedRegionalCertificateAuthority without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -570,7 +559,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getSharedRegionalCertificateAuthority with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -594,7 +583,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes getSharedRegionalCertificateAuthority with closed client', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -613,7 +602,7 @@ describe('v1beta.MemorystoreClient', () => { describe('createInstance', () => { it('invokes createInstance without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -641,7 +630,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes createInstance without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -682,7 +671,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes createInstance with call error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -706,7 +695,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes createInstance with LRO error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -731,7 +720,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes checkCreateInstanceProgress without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -751,7 +740,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes checkCreateInstanceProgress with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -767,7 +756,7 @@ describe('v1beta.MemorystoreClient', () => { describe('updateInstance', () => { it('invokes updateInstance without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -796,7 +785,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes updateInstance without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -838,7 +827,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes updateInstance with call error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -863,7 +852,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes updateInstance with LRO error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -889,7 +878,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes checkUpdateInstanceProgress without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -909,7 +898,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes checkUpdateInstanceProgress with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -925,7 +914,7 @@ describe('v1beta.MemorystoreClient', () => { describe('deleteInstance', () => { it('invokes deleteInstance without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -953,7 +942,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes deleteInstance without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -994,7 +983,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes deleteInstance with call error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1018,7 +1007,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes deleteInstance with LRO error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1043,7 +1032,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes checkDeleteInstanceProgress without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1063,7 +1052,7 @@ describe('v1beta.MemorystoreClient', () => { it('invokes checkDeleteInstanceProgress with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1253,7 +1242,7 @@ describe('v1beta.MemorystoreClient', () => { it('uses async iteration with listInstances without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1323,7 +1312,7 @@ describe('v1beta.MemorystoreClient', () => { describe('getLocation', () => { it('invokes getLocation without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1350,7 +1339,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes getLocation without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1392,7 +1381,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes getLocation with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1418,7 +1407,7 @@ describe('v1beta.MemorystoreClient', () => { describe('listLocationsAsync', () => { it('uses async iteration with listLocations without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1489,7 +1478,7 @@ describe('v1beta.MemorystoreClient', () => { describe('getOperation', () => { it('invokes getOperation without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1508,7 +1497,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes getOperation without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -1540,7 +1529,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes getOperation with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -1556,7 +1545,7 @@ describe('v1beta.MemorystoreClient', () => { describe('cancelOperation', () => { it('invokes cancelOperation without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1575,7 +1564,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes cancelOperation without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -1607,7 +1596,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes cancelOperation with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -1623,7 +1612,7 @@ describe('v1beta.MemorystoreClient', () => { describe('deleteOperation', () => { it('invokes deleteOperation without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); @@ -1642,7 +1631,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes deleteOperation without error using callback', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -1674,7 +1663,7 @@ describe('v1beta.MemorystoreClient', () => { }); it('invokes deleteOperation with error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( @@ -1690,7 +1679,7 @@ describe('v1beta.MemorystoreClient', () => { describe('listOperationsAsync', () => { it('uses async iteration with listOperations without error', async () => { const client = new memorystoreModule.v1beta.MemorystoreClient({ - auth: googleAuth, + credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); const request = generateSampleMessage( diff --git a/packages/google-cloud-memorystore/webpack.config.js b/packages/google-cloud-memorystore/webpack.config.js index 557b30c35d41..195ff6313b43 100644 --- a/packages/google-cloud-memorystore/webpack.config.js +++ b/packages/google-cloud-memorystore/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2026 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.