diff --git a/librarian.yaml b/librarian.yaml index 7679399e46c2..abc5b5ac9a98 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -24,7 +24,6 @@ default: - package.json - samples/package.json - samples/quickstart.js - - samples/test/quickstart.js - samples/README.md - README.md - CHANGELOG.md diff --git a/packages/google-ads-admanager/samples/test/quickstart.js b/packages/google-ads-admanager/samples/test/quickstart.js deleted file mode 100644 index a4e233e365cc..000000000000 --- a/packages/google-ads-admanager/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {UserServiceClient} = require('@google-ads/admanager').v1; -// const admanagerClient = new UserServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await admanagerClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-ai-generativelanguage/samples/test/quickstart.js b/packages/google-ai-generativelanguage/samples/test/quickstart.js deleted file mode 100644 index 52773d22a1f4..000000000000 --- a/packages/google-ai-generativelanguage/samples/test/quickstart.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {TextServiceClient} = require('@google-ai/generativelanguage').v1beta2; -const generativelanguageClient = new TextServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await generativelanguageClient.getProjectId(); - }); - - it('should run quickstart', async () => { - assert(projectId); // Fake assertion until we can get a testing project up. - }); -}); diff --git a/packages/google-analytics-admin/samples/test/quickstart.js b/packages/google-analytics-admin/samples/test/quickstart.js deleted file mode 100644 index 1728ba0c7b34..000000000000 --- a/packages/google-analytics-admin/samples/test/quickstart.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', async () => { - it('should run quickstart', async () => { - const output = execSync('node quickstart.js', {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-analytics-data/samples/test/quickstart.js b/packages/google-analytics-data/samples/test/quickstart.js deleted file mode 100644 index 08601da6ebc3..000000000000 --- a/packages/google-analytics-data/samples/test/quickstart.js +++ /dev/null @@ -1,34 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const cp = require('child_process'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const GA4_PROPERTY_ID = process.env.GA4_PROPERTY_ID || '222596558'; - -describe('Quickstart', () => { - it('should run quickstart', async () => { - // eslint-disable-next-line no-unused-vars - const stdout = execSync(`node ./quickstart.js ${GA4_PROPERTY_ID}`); - assert.match(stdout, /Report result/); - }); -}); diff --git a/packages/google-api-apikeys/samples/test/quickstart.js b/packages/google-api-apikeys/samples/test/quickstart.js deleted file mode 100644 index 1af87438b347..000000000000 --- a/packages/google-api-apikeys/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ApiKeysClient} = require('@google-cloud/apikeys').v2; -const apikeysClient = new ApiKeysClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await apikeysClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - { - cwd, - } - ); - assert(output !== null); - }); -}); diff --git a/packages/google-api-cloudquotas/samples/test/quickstart.js b/packages/google-api-cloudquotas/samples/test/quickstart.js deleted file mode 100644 index 5ede377f26e6..000000000000 --- a/packages/google-api-cloudquotas/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {CloudQuotasClient} = require('@google-cloud/cloudquotas').v1; -const cloudquotasClient = new CloudQuotasClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await cloudquotasClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-api-servicecontrol/samples/test/quickstart.js b/packages/google-api-servicecontrol/samples/test/quickstart.js deleted file mode 100644 index f196a2ed77d3..000000000000 --- a/packages/google-api-servicecontrol/samples/test/quickstart.js +++ /dev/null @@ -1,38 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const stdout = execSync('node ./quickstart.js long-door-651.appspot.com', { - cwd, - }); - assert.match(stdout, /serviceConfigId/); - }); -}); diff --git a/packages/google-api-servicemanagement/samples/test/quickstart.js b/packages/google-api-servicemanagement/samples/test/quickstart.js deleted file mode 100644 index 8980e65bf138..000000000000 --- a/packages/google-api-servicemanagement/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {ServiceManagerClient} = require('@google-cloud/service-management'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ServiceManagerClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /\[[\s\S]*\]/); - }); -}); diff --git a/packages/google-api-serviceusage/samples/test/quickstart.js b/packages/google-api-serviceusage/samples/test/quickstart.js deleted file mode 100644 index 041453cbbc68..000000000000 --- a/packages/google-api-serviceusage/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {ServiceUsageClient} = require('@google-cloud/service-usage'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ServiceUsageClient(); - -describe('Quickstart', () => { - let projectId; - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - assert.match(stdout, /phishingprotection.googleapis.com/); - }); -}); diff --git a/packages/google-appengine/samples/test/quickstart.js b/packages/google-appengine/samples/test/quickstart.js deleted file mode 100644 index 95d2c9e9d85a..000000000000 --- a/packages/google-appengine/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {ServicesClient} = require('@google-cloud/appengine-admin'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ServicesClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /\[[\s\S]*\[[\s\S]*\][\s\S]*\]/); - }); -}); diff --git a/packages/google-apps-events-subscriptions/samples/test/quickstart.js b/packages/google-apps-events-subscriptions/samples/test/quickstart.js deleted file mode 100644 index acdf3ccbac71..000000000000 --- a/packages/google-apps-events-subscriptions/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {SubscriptionsServiceClient} = require('@google-cloud/subscriptions').v1; -const workspaceeventsClient = new SubscriptionsServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await workspaceeventsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - 'node ./quickstart.js event_types:"google.workspace.chat.membership.v1.updated"', - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-apps-meet/samples/test/quickstart.js b/packages/google-apps-meet/samples/test/quickstart.js deleted file mode 100644 index c78cca208150..000000000000 --- a/packages/google-apps-meet/samples/test/quickstart.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => {}); - - it('should run quickstart', async () => { - const output = execSync('node ./quickstart.js', {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-area120-tables/samples/test/quickstart.js b/packages/google-area120-tables/samples/test/quickstart.js deleted file mode 100644 index c7a08d9b8536..000000000000 --- a/packages/google-area120-tables/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {assert} = require('chai'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// eslint-disable-next-line node/no-extraneous-require, node/no-missing-require -const {TablesServiceClient} = require('@google/area120-tables'); - -const client = new TablesServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`); - assert.match(stdout, /\[[^\]]*\]/); - }); -}); diff --git a/packages/google-chat/samples/test/quickstart.js b/packages/google-chat/samples/test/quickstart.js deleted file mode 100644 index a22b70568d3f..000000000000 --- a/packages/google-chat/samples/test/quickstart.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ChatServiceClient} = require('@google-apps/chat').v1; -const chatClient = new ChatServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await chatClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync('node ./quickstart.js', {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-accessapproval/samples/test/quickstart.js b/packages/google-cloud-accessapproval/samples/test/quickstart.js deleted file mode 100644 index 0229faa1688d..000000000000 --- a/packages/google-cloud-accessapproval/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {AccessApprovalClient} = require('@google-cloud/access-approval'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new AccessApprovalClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-advisorynotifications/samples/test/quickstart.js b/packages/google-cloud-advisorynotifications/samples/test/quickstart.js deleted file mode 100644 index 0e8007ce545c..000000000000 --- a/packages/google-cloud-advisorynotifications/samples/test/quickstart.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// describe('Quickstart', () => { -// Cannot run this test since we do not have these permissions on google org -// it('should run quickstart', async () => { -// const output = execSync( -// 'node ./quickstart.js organizations/433637338589/locations/us-central1', -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-cloud-aiplatform/samples/test/quickstart.js b/packages/google-cloud-aiplatform/samples/test/quickstart.js deleted file mode 100644 index 2f29afa74b12..000000000000 --- a/packages/google-cloud-aiplatform/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {EndpointServiceClient} = require('@google-cloud/aiplatform'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new EndpointServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.ok(stdout !== null); - }); -}); diff --git a/packages/google-cloud-alloydb/samples/test/quickstart.js b/packages/google-cloud-alloydb/samples/test/quickstart.js deleted file mode 100644 index f310ba07e471..000000000000 --- a/packages/google-cloud-alloydb/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1; -const alloydbClient = new AlloyDBAdminClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await alloydbClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-apigeeconnect/samples/test/quickstart.js b/packages/google-cloud-apigeeconnect/samples/test/quickstart.js deleted file mode 100644 index 6e9f23090c0a..000000000000 --- a/packages/google-cloud-apigeeconnect/samples/test/quickstart.js +++ /dev/null @@ -1,50 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {TetherClient} = require('@google-cloud/apigee-connect'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new TetherClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} apigee_mart`, { - cwd, - }); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-apigeeregistry/samples/test/quickstart.js b/packages/google-cloud-apigeeregistry/samples/test/quickstart.js deleted file mode 100644 index 4603baafd9e5..000000000000 --- a/packages/google-cloud-apigeeregistry/samples/test/quickstart.js +++ /dev/null @@ -1,51 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {RegistryClient} = require('@google-cloud/apigee-registry'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new RegistryClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - assert.throws(() => { - execSync(`node ./quickstart.js projects/${projectId}/locations/global`, { - cwd, - }); - }, /9 FAILED_PRECONDITION/); - }); -}); diff --git a/packages/google-cloud-apihub/samples/test/quickstart.js b/packages/google-cloud-apihub/samples/test/quickstart.js deleted file mode 100644 index f146cff1adfc..000000000000 --- a/packages/google-cloud-apihub/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ApiHubClient} = require('@google-cloud/apihub').v1; -const apihubClient = new ApiHubClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await apihubClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-apphub/samples/test/quickstart.js b/packages/google-cloud-apphub/samples/test/quickstart.js deleted file mode 100644 index bfb409c631bf..000000000000 --- a/packages/google-cloud-apphub/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {AppHubClient} = require('@google-cloud/apphub').v1; -const apphubClient = new AppHubClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await apphubClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-assuredworkloads/samples/test/quickstart.js b/packages/google-cloud-assuredworkloads/samples/test/quickstart.js deleted file mode 100644 index f0316e09a333..000000000000 --- a/packages/google-cloud-assuredworkloads/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const project = process.env.GCLOUD_PROJECT; - -describe('Quickstart', () => { - it('should run quickstart', async () => { - try { - execSync(`node ./quickstart.js ${project}`, { - cwd, - }); - throw Error('not reachable'); - } catch (err) { - assert.match(err.message, /Fail to resolve resource/); - } - }); -}); diff --git a/packages/google-cloud-automl/samples/test/quickstart.js b/packages/google-cloud-automl/samples/test/quickstart.js deleted file mode 100644 index 68909aafc05c..000000000000 --- a/packages/google-cloud-automl/samples/test/quickstart.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const {AutoMlClient} = require('@google-cloud/automl').v1; - -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const LOCATION = 'us-central1'; - -describe('Automl List Dataset Tests', () => { - const client = new AutoMlClient(); - - it('should list datasets', async () => { - const projectId = await client.getProjectId(); - const list_output = execSync(`node quickstart.js ${projectId} ${LOCATION}`); - - assert.match(list_output, /Dataset id/); - }); -}); diff --git a/packages/google-cloud-backupdr/samples/test/quickstart.js b/packages/google-cloud-backupdr/samples/test/quickstart.js deleted file mode 100644 index aec03bdc0600..000000000000 --- a/packages/google-cloud-backupdr/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {BackupDRClient} = require('@google-cloud/backupdr').v1; -const backupdrClient = new BackupDRClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await backupdrClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-baremetalsolution/samples/test/quickstart.js b/packages/google-cloud-baremetalsolution/samples/test/quickstart.js deleted file mode 100644 index 11747d7dede0..000000000000 --- a/packages/google-cloud-baremetalsolution/samples/test/quickstart.js +++ /dev/null @@ -1,48 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {BareMetalSolutionClient} = require('@google-cloud/bare-metal-solution'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new BareMetalSolutionClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert.ok(stdout !== null); - }); -}); diff --git a/packages/google-cloud-batch/samples/test/quickstart.js b/packages/google-cloud-batch/samples/test/quickstart.js deleted file mode 100644 index 5bad1f2b7c43..000000000000 --- a/packages/google-cloud-batch/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {BatchServiceClient} = require('@google-cloud/batch').v1; -const batchClient = new BatchServiceClient(); - -const execSync = cmd => - cp.execSync(cmd, {encoding: 'utf-8', maxBuffer: 50 * 1024 * 1024}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await batchClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-beyondcorp-appconnections/samples/test/quickstart.js b/packages/google-cloud-beyondcorp-appconnections/samples/test/quickstart.js deleted file mode 100644 index 2c95ab9016b2..000000000000 --- a/packages/google-cloud-beyondcorp-appconnections/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {AppConnectionsServiceClient} = - require('@google-cloud/appconnections').v1; -const appconnectionsClient = new AppConnectionsServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await appconnectionsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-beyondcorp-appconnectors/samples/test/quickstart.js b/packages/google-cloud-beyondcorp-appconnectors/samples/test/quickstart.js deleted file mode 100644 index d781a5dc5199..000000000000 --- a/packages/google-cloud-beyondcorp-appconnectors/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {assert} = require('chai'); -const {AppConnectorsServiceClient} = require('@google-cloud/appconnectors').v1; -const appconnectorsClient = new AppConnectorsServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await appconnectorsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-beyondcorp-appgateways/samples/test/quickstart.js b/packages/google-cloud-beyondcorp-appgateways/samples/test/quickstart.js deleted file mode 100644 index 20c1f9ad64bd..000000000000 --- a/packages/google-cloud-beyondcorp-appgateways/samples/test/quickstart.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -// Imports the Appgateways library -const {AppGatewaysServiceClient} = require('@google-cloud/appgateways').v1; - -// Instantiates a client -const appgatewaysClient = new AppGatewaysServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await appgatewaysClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/test/quickstart.js b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/test/quickstart.js deleted file mode 100644 index 1c2d714e06dd..000000000000 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// Not running tests per b/278007126 -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {ClientConnectorServicesServiceClient} = -// require('@google-cloud/clientconnectorservices').v1; -// const clientconnectorservicesClient = -// new ClientConnectorServicesServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await clientconnectorservicesClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/test/quickstart.js b/packages/google-cloud-beyondcorp-clientgateways/samples/test/quickstart.js deleted file mode 100644 index 4ef7c279c773..000000000000 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Not running tests per b/278007126 -// // Copyright 2026 Google LLC -// // -// // Licensed under the Apache License, Version 2.0 (the "License"); -// // you may not use this file except in compliance with the License. -// // You may obtain a copy of the License at -// // -// // https://www.apache.org/licenses/LICENSE-2.0 -// // -// // Unless required by applicable law or agreed to in writing, software -// // distributed under the License is distributed on an "AS IS" BASIS, -// // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// // See the License for the specific language governing permissions and -// // limitations under the License. - -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {ClientGatewaysServiceClient} = -// require('@google-cloud/clientgateways').v1; -// const clientgatewaysClient = new ClientGatewaysServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await clientgatewaysClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-cloud-bigquery-analyticshub/samples/test/quickstart.js b/packages/google-cloud-bigquery-analyticshub/samples/test/quickstart.js deleted file mode 100644 index 476011ba188c..000000000000 --- a/packages/google-cloud-bigquery-analyticshub/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {AnalyticsHubServiceClient} = - require('@google-cloud/bigquery-analyticshub').v1; -const analyticshubClient = new AnalyticsHubServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await analyticshubClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/asia-east1/dataExchanges/abc123`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-bigquery-connection/samples/test/quickstart.js b/packages/google-cloud-bigquery-connection/samples/test/quickstart.js deleted file mode 100644 index b50ebfee715a..000000000000 --- a/packages/google-cloud-bigquery-connection/samples/test/quickstart.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const {assert} = require('chai'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {ConnectionServiceClient} = require('@google-cloud/bigquery-connection'); -const client = new ConnectionServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('Quickstart', () => { - let project; - before(async () => { - project = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${project}`); - assert.match(stdout, /found [0-9]+ connections/); - }); -}); diff --git a/packages/google-cloud-bigquery-dataexchange/samples/test/quickstart.js b/packages/google-cloud-bigquery-dataexchange/samples/test/quickstart.js deleted file mode 100644 index fb84b59ad82b..000000000000 --- a/packages/google-cloud-bigquery-dataexchange/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {AnalyticsHubServiceClient} = - require('@google-cloud/bigquery-data-exchange').v1beta1; - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new AnalyticsHubServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - // Should have 0 exit code, and therefore not throw: - execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - }); -}); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/test/quickstart.js b/packages/google-cloud-bigquery-datapolicies/samples/test/quickstart.js deleted file mode 100644 index 60852027455e..000000000000 --- a/packages/google-cloud-bigquery-datapolicies/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {DataPolicyServiceClient} = - require('@google-cloud/bigquery-datapolicies').v1beta1; -const datapoliciesClient = new DataPolicyServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await datapoliciesClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-bigquery-datatransfer/samples/test/quickstart.js b/packages/google-cloud-bigquery-datatransfer/samples/test/quickstart.js deleted file mode 100644 index 24607220bee6..000000000000 --- a/packages/google-cloud-bigquery-datatransfer/samples/test/quickstart.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('quickstart', () => { - it('should return a list of resources', () => { - const stdout = execSync('node quickstart'); - assert.match(stdout, /^Data sources/); - }); -}); diff --git a/packages/google-cloud-bigquery-migration/samples/test/quickstart.js b/packages/google-cloud-bigquery-migration/samples/test/quickstart.js deleted file mode 100644 index 5106290fdb24..000000000000 --- a/packages/google-cloud-bigquery-migration/samples/test/quickstart.js +++ /dev/null @@ -1,48 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new MigrationServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us`, - {cwd} - ); - assert.deepStrictEqual(stdout, ''); - }); -}); diff --git a/packages/google-cloud-bigquery-reservation/samples/test/quickstart.js b/packages/google-cloud-bigquery-reservation/samples/test/quickstart.js deleted file mode 100644 index e1fe9504dd59..000000000000 --- a/packages/google-cloud-bigquery-reservation/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const {assert} = require('chai'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const { - ReservationServiceClient, -} = require('@google-cloud/bigquery-reservation'); -const client = new ReservationServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`); - assert.match(stdout, /found [0-9]+ reservations/); - assert.match(stdout, /found [0-9]+ commitments/); - }); -}); diff --git a/packages/google-cloud-billing-budgets/samples/test/quickstart.js b/packages/google-cloud-billing-budgets/samples/test/quickstart.js deleted file mode 100644 index ff072bd696b2..000000000000 --- a/packages/google-cloud-billing-budgets/samples/test/quickstart.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - -describe('Sample Integration Tests', () => { - it('should run quickstart.js', async () => { - try { - execSync('node ./quickstart.js billingAccounts/000000-000000-000000', { - cwd, - }); - } catch (err) { - assert.include(err.stderr, 'PERMISSION_DENIED'); - } - }); -}); diff --git a/packages/google-cloud-billing/samples/test/quickstart.js b/packages/google-cloud-billing/samples/test/quickstart.js deleted file mode 100644 index e66d4cb07971..000000000000 --- a/packages/google-cloud-billing/samples/test/quickstart.js +++ /dev/null @@ -1,34 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const stdout = execSync('node ./quickstart.js', {cwd}); - assert.match(stdout, /found [0-9]+ billing accounts/); - }); -}); diff --git a/packages/google-cloud-binaryauthorization/samples/test/quickstart.js b/packages/google-cloud-binaryauthorization/samples/test/quickstart.js deleted file mode 100644 index 70b6384c2e20..000000000000 --- a/packages/google-cloud-binaryauthorization/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const { - BinauthzManagementServiceV1Client, -} = require('@google-cloud/binary-authorization'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - const client = new BinauthzManagementServiceV1Client(); - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js projects/${projectId}`); - assert.ok(stdout); - }); -}); diff --git a/packages/google-cloud-certificatemanager/samples/test/quickstart.js b/packages/google-cloud-certificatemanager/samples/test/quickstart.js deleted file mode 100644 index 68622618ce05..000000000000 --- a/packages/google-cloud-certificatemanager/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {CertificateManagerClient} = - require('@google-cloud/certificate-manager').v1; - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new CertificateManagerClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - // Should have 0 exit code, and therefore not throw: - execSync(`node ./quickstart.js projects/${projectId}/locations/global`, { - cwd, - }); - }); -}); diff --git a/packages/google-cloud-channel/samples/test/quickstart.js b/packages/google-cloud-channel/samples/test/quickstart.js deleted file mode 100644 index 74dceebdcc38..000000000000 --- a/packages/google-cloud-channel/samples/test/quickstart.js +++ /dev/null @@ -1,37 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - try { - execSync('node ./quickstart.js 1234', {cwd}); - } catch (err) { - assert.match(err.message, /Cannot read/); - } - }); -}); diff --git a/packages/google-cloud-chronicle/samples/test/quickstart.js b/packages/google-cloud-chronicle/samples/test/quickstart.js deleted file mode 100644 index 5d6d7b23e17e..000000000000 --- a/packages/google-cloud-chronicle/samples/test/quickstart.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {RuleServiceClient} = require('@google-cloud/chronicle').v1; -const chronicleClient = new RuleServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await chronicleClient.getProjectId(); - }); - - it('should create a valid client', () => { - assert(chronicleClient); - }); -}); diff --git a/packages/google-cloud-cloudcontrolspartner/samples/test/quickstart.js b/packages/google-cloud-cloudcontrolspartner/samples/test/quickstart.js deleted file mode 100644 index 027c56cecbf6..000000000000 --- a/packages/google-cloud-cloudcontrolspartner/samples/test/quickstart.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Not running this test as it requires the SA to have access to the google org, which it cannot get. -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it} = require('mocha'); -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// it('should run quickstart', async () => { -// const output = execSync( -// 'node ./quickstart.js organizations/google/locations/us-central1', -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-cloud-clouddms/samples/test/quickstart.js b/packages/google-cloud-clouddms/samples/test/quickstart.js deleted file mode 100644 index 106279c8663e..000000000000 --- a/packages/google-cloud-clouddms/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {DataMigrationServiceClient} = require('@google-cloud/dms'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new DataMigrationServiceClient(); - -describe('Quickstart', () => { - let projectId; - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, { - cwd, - }); - assert.match(stdout, /DRAFT/); - }); -}); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/test/quickstart.js b/packages/google-cloud-commerce-consumer-procurement/samples/test/quickstart.js deleted file mode 100644 index fb8e5ce41fda..000000000000 --- a/packages/google-cloud-commerce-consumer-procurement/samples/test/quickstart.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {describe, it} = require('mocha'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - // Need to write a test with an env variable that contains the billing account - // execSync('node quickstart.js billingAccounts/1234', {cwd}); - }); -}); diff --git a/packages/google-cloud-compute/samples/test/quickstart.js b/packages/google-cloud-compute/samples/test/quickstart.js deleted file mode 100644 index fc84634479f5..000000000000 --- a/packages/google-cloud-compute/samples/test/quickstart.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const compute = require('@google-cloud/compute'); - -const {describe, it} = require('mocha'); -const cp = require('child_process'); -const {assert} = require('chai'); - -const instancesClient = new compute.InstancesClient({fallback: 'rest'}); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('samples', () => { - it('should print all instances list', async () => { - const projectId = await instancesClient.getProjectId(); - const output = execSync(`node quickstart.js ${projectId}`); - assert.match(output, /Instances found:/); - }); -}); diff --git a/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js b/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js deleted file mode 100644 index 54b7727cff5e..000000000000 --- a/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ConfidentialComputingClient} = - require('@google-cloud/confidentialcomputing').v1alpha1; -const confidentialcomputingClient = new ConfidentialComputingClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await confidentialcomputingClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-config/samples/test/quickstart.js b/packages/google-cloud-config/samples/test/quickstart.js deleted file mode 100644 index 5793cb2de860..000000000000 --- a/packages/google-cloud-config/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ConfigClient} = require('@google-cloud/config').v1; -const configClient = new ConfigClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await configClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-connectors/samples/test/quickstart.js b/packages/google-cloud-connectors/samples/test/quickstart.js deleted file mode 100644 index dbdb10211e82..000000000000 --- a/packages/google-cloud-connectors/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ConnectorsClient} = require('@google-cloud/connectors').v1; -const connectorsClient = new ConnectorsClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await connectorsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js b/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js deleted file mode 100644 index c2a9f580a561..000000000000 --- a/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js +++ /dev/null @@ -1,49 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const { - ContactCenterInsightsClient, -} = require('@google-cloud/contact-center-insights'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ContactCenterInsightsClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, { - cwd, - }); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-contentwarehouse/samples/test/quickstart.js b/packages/google-cloud-contentwarehouse/samples/test/quickstart.js deleted file mode 100644 index 69feb6aa28ba..000000000000 --- a/packages/google-cloud-contentwarehouse/samples/test/quickstart.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - const projectId = '1046198160504'; // long-door-651 (content warehouse requires # not ID). - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-datacatalog-lineage/samples/test/quickstart.js b/packages/google-cloud-datacatalog-lineage/samples/test/quickstart.js deleted file mode 100644 index 0bf408c5ccf9..000000000000 --- a/packages/google-cloud-datacatalog-lineage/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {LineageClient} = require('@google-cloud/lineage').v1; -const lineageClient = new LineageClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await lineageClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-datacatalog/samples/test/quickstart.js b/packages/google-cloud-datacatalog/samples/test/quickstart.js deleted file mode 100644 index 2838df8d9f55..000000000000 --- a/packages/google-cloud-datacatalog/samples/test/quickstart.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -'use strict'; - - -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const cp = require('child_process'); -// Imports the Datacatalog library -const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - -// Instantiates a client -const datacatalogClient = new DataCatalogClient(); - - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - - -describe('Quickstart', async () => { - let projectId; - - - before(async () => { - projectId = await datacatalogClient.getProjectId(); - }); - - - it('quickstart should attach tag to BigQuery table', async () => { - const output = execSync( - `node quickstart projects/${projectId}/locations/us-central1`, - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-dataform/samples/test/quickstart.js b/packages/google-cloud-dataform/samples/test/quickstart.js deleted file mode 100644 index 3a52088de766..000000000000 --- a/packages/google-cloud-dataform/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {DataformClient} = require('@google-cloud/dataform').v1beta1; -const dataformClient = new DataformClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await dataformClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-datafusion/samples/test/quickstart.js b/packages/google-cloud-datafusion/samples/test/quickstart.js deleted file mode 100644 index 4e2182169db6..000000000000 --- a/packages/google-cloud-datafusion/samples/test/quickstart.js +++ /dev/null @@ -1,46 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {DataFusionClient} = require('@google-cloud/data-fusion'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new DataFusionClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert.match(stdout, /availableFeatures/); - }); -}); diff --git a/packages/google-cloud-datalabeling/samples/test/quickstart.js b/packages/google-cloud-datalabeling/samples/test/quickstart.js deleted file mode 100644 index b8b798a4d3d6..000000000000 --- a/packages/google-cloud-datalabeling/samples/test/quickstart.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const {execSync} = require('child_process'); -const {DataLabelingServiceClient} = require('@google-cloud/datalabeling'); -const client = new DataLabelingServiceClient(); - -const exec = cmd => execSync(cmd, {encoding: 'utf8'}); - -describe('quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run the quickstart', () => { - const stdout = exec(`node quickstart.js ${projectId}`); - assert.include(stdout, 'Datasets:'); - }); -}); diff --git a/packages/google-cloud-dataplex/samples/test/quickstart.js b/packages/google-cloud-dataplex/samples/test/quickstart.js deleted file mode 100644 index c6fab4f5c375..000000000000 --- a/packages/google-cloud-dataplex/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {DataplexServiceClient} = require('@google-cloud/dataplex'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new DataplexServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, { - cwd, - }); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-dataproc/samples/test/quickstart.js b/packages/google-cloud-dataproc/samples/test/quickstart.js deleted file mode 100644 index fbcb8002e18e..000000000000 --- a/packages/google-cloud-dataproc/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {ClusterControllerClient} = require('@google-cloud/dataproc').v1; -const client = new ClusterControllerClient(); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} global`, { - cwd, - }); - assert.ok(stdout !== null); - }); -}); diff --git a/packages/google-cloud-dataqna/samples/test/quickstart.js b/packages/google-cloud-dataqna/samples/test/quickstart.js deleted file mode 100644 index 26d2a25bf80c..000000000000 --- a/packages/google-cloud-dataqna/samples/test/quickstart.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {AutoSuggestionServiceClient} = require('@google-cloud/data-qna'); -const client = new AutoSuggestionServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - it('should run quickstart', async () => { - const stdout = execSync('node ./quickstart.js'); - assert.include(stdout, `Project: ${projectId}`); - }); -}); diff --git a/packages/google-cloud-datastream/samples/test/quickstart.js b/packages/google-cloud-datastream/samples/test/quickstart.js deleted file mode 100644 index 7b15d8d2980d..000000000000 --- a/packages/google-cloud-datastream/samples/test/quickstart.js +++ /dev/null @@ -1,49 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {DatastreamClient} = require('@google-cloud/datastream'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new DatastreamClient(); -const location = 'us-central1'; - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/${location}`, - {cwd} - ); - assert(stdout.includes(location)); - }); -}); diff --git a/packages/google-cloud-deploy/samples/test/quickstart.js b/packages/google-cloud-deploy/samples/test/quickstart.js deleted file mode 100644 index 3c783c46cc22..000000000000 --- a/packages/google-cloud-deploy/samples/test/quickstart.js +++ /dev/null @@ -1,48 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {CloudDeployClient} = require('@google-cloud/deploy'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new CloudDeployClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(stdout !== null); - }); -}); diff --git a/packages/google-cloud-developerconnect/samples/test/quickstart.js b/packages/google-cloud-developerconnect/samples/test/quickstart.js deleted file mode 100644 index bc90d5f69fb6..000000000000 --- a/packages/google-cloud-developerconnect/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {DeveloperConnectClient} = require('@google-cloud/developerconnect').v1; -const developerconnectClient = new DeveloperConnectClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await developerconnectClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-devicestreaming/samples/test/quickstart.js b/packages/google-cloud-devicestreaming/samples/test/quickstart.js deleted file mode 100644 index 8b9f38031873..000000000000 --- a/packages/google-cloud-devicestreaming/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {DirectAccessServiceClient} = require('@google-cloud/devicestreaming').v1; -const devicestreamingClient = new DirectAccessServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await devicestreamingClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-dialogflow-cx/samples/test/quickstart.js b/packages/google-cloud-dialogflow-cx/samples/test/quickstart.js deleted file mode 100644 index eca231197280..000000000000 --- a/packages/google-cloud-dialogflow-cx/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const project = process.env.GCLOUD_PROJECT; - -describe('Quickstart', () => { - it('should run quickstart', async () => { - try { - // TODO: write an actual functional test: - execSync( - `node ./quickstart.js ${project} global my-agent audio.raw AUDIO_ENCODING_LINEAR_16 16000 en`, - {cwd} - ); - assert('unreachable'); - } catch (err) { - assert.match(err.message, /no such file or directory, open 'audio.raw/); - } - }); -}); diff --git a/packages/google-cloud-dialogflow/samples/test/quickstart.js b/packages/google-cloud-dialogflow/samples/test/quickstart.js deleted file mode 100644 index 8e75c432125b..000000000000 --- a/packages/google-cloud-dialogflow/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ConversationsClient} = require('@google-cloud/dialogflow').v2; -const dialogflowClient = new ConversationsClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await dialogflowClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - { - cwd, - } - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-discoveryengine/samples/test/quickstart.js b/packages/google-cloud-discoveryengine/samples/test/quickstart.js deleted file mode 100644 index b90a4be9079a..000000000000 --- a/packages/google-cloud-discoveryengine/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {DocumentServiceClient} = require('@google-cloud/discoveryengine').v1beta; -const discoveryengineClient = new DocumentServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await discoveryengineClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global/dataStores/default_data_store/branches/0`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-documentai/samples/test/quickstart.js b/packages/google-cloud-documentai/samples/test/quickstart.js deleted file mode 100644 index de00aec977f2..000000000000 --- a/packages/google-cloud-documentai/samples/test/quickstart.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright 2019, Google, Inc. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -const path = require('path'); -const assert = require('assert'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); - -const {DocumentProcessorServiceClient} = - require('@google-cloud/documentai').v1beta3; -const client = new DocumentProcessorServiceClient({ - apiEndpoint: 'us-documentai.googleapis.com', -}); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); -const LOCATION = 'us'; -const PROCESSOR_ID = '8f1123c1b125e0b7'; - -const fileName = 'invoice.pdf'; -const filePath = path.resolve(path.join(__dirname, `../resources/${fileName}`)); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js ${projectId} ${LOCATION} ${PROCESSOR_ID} ${filePath}`, - { - cwd, - } - ); - assert.notStrictEqual(stdout.indexOf('Paragraph'), -1); - }); -}); diff --git a/packages/google-cloud-domains/samples/test/quickstart.js b/packages/google-cloud-domains/samples/test/quickstart.js deleted file mode 100644 index cbe7db6696ed..000000000000 --- a/packages/google-cloud-domains/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {DomainsClient} = require('@google-cloud/domains'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new DomainsClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} global`, {cwd}); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-edgecontainer/samples/test/quickstart.js b/packages/google-cloud-edgecontainer/samples/test/quickstart.js deleted file mode 100644 index 46d243a48231..000000000000 --- a/packages/google-cloud-edgecontainer/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {EdgeContainerClient} = require('@google-cloud/edgecontainer').v1; -const edgecontainerClient = new EdgeContainerClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await edgecontainerClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-edgenetwork/samples/test/quickstart.js b/packages/google-cloud-edgenetwork/samples/test/quickstart.js deleted file mode 100644 index 4ec531e8abd7..000000000000 --- a/packages/google-cloud-edgenetwork/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {EdgeNetworkClient} = require('@google-cloud/edgenetwork').v1; -const edgenetworkClient = new EdgeNetworkClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await edgenetworkClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-essentialcontacts/samples/test/quickstart.js b/packages/google-cloud-essentialcontacts/samples/test/quickstart.js deleted file mode 100644 index 42bd65f3be5b..000000000000 --- a/packages/google-cloud-essentialcontacts/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); -const { - EssentialContactsServiceClient, -} = require('@google-cloud/essential-contacts'); -const client = new EssentialContactsServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /\[[\s\S]*\]/); - }); -}); diff --git a/packages/google-cloud-eventarc-publishing/samples/test/quickstart.js b/packages/google-cloud-eventarc-publishing/samples/test/quickstart.js deleted file mode 100644 index 55f2bd78c250..000000000000 --- a/packages/google-cloud-eventarc-publishing/samples/test/quickstart.js +++ /dev/null @@ -1,60 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -// eslint-disable-next-line node/no-missing-require -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {PublisherClient} = require('@google-cloud/eventarc-publishing'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new PublisherClient(); -const id = '1234'; -const providerId = 'weatherco'; -const eventType = 'weatherco.v1.forecast'; -const date = '1970-01-01T00:00:01Z'; -const textData = '{"message": "test message 123"}'; -const channelConnectionName = 'test-connection-abc'; - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - let channelConnectionId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - channelConnectionId = `projects/${projectId}/locations/us-central1/channelConnections/${channelConnectionName}`; - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node quickstart.js ${channelConnectionId} ${id} ${providerId} ${eventType} ${date} '${textData}'`, - {cwd} - ); - assert(stdout, stdout !== null); - }); -}); diff --git a/packages/google-cloud-eventarc/samples/test/quickstart.js b/packages/google-cloud-eventarc/samples/test/quickstart.js deleted file mode 100644 index 7090ddd2221b..000000000000 --- a/packages/google-cloud-eventarc/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {EventarcClient} = require('@google-cloud/eventarc'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new EventarcClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.strictEqual(stdout.includes('test-event-arc-api'), true); - }); -}); diff --git a/packages/google-cloud-filestore/samples/test/quickstart.js b/packages/google-cloud-filestore/samples/test/quickstart.js deleted file mode 100644 index c9b72827f1da..000000000000 --- a/packages/google-cloud-filestore/samples/test/quickstart.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const assert = require('assert'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {CloudFilestoreManagerClient} = require('@google-cloud/filestore'); -const client = new CloudFilestoreManagerClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const location = 'us-central1-a'; - -describe('Quickstart', () => { - let project; - before(async () => { - project = await client.getProjectId(); - }); - it('should run quickstart', async () => { - const out = execSync(`node ./quickstart.js ${project} ${location}`, {cwd}); - assert.strictEqual(out.includes('fileShares'), true); - }); -}); diff --git a/packages/google-cloud-financialservices/samples/test/quickstart.js b/packages/google-cloud-financialservices/samples/test/quickstart.js deleted file mode 100644 index 6b8732cfb6c6..000000000000 --- a/packages/google-cloud-financialservices/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {AMLClient} = require('@google-cloud/financialservices').v1; -const financialservicesClient = new AMLClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await financialservicesClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-functions/samples/test/quickstart.js b/packages/google-cloud-functions/samples/test/quickstart.js deleted file mode 100644 index f341c16be475..000000000000 --- a/packages/google-cloud-functions/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {CloudFunctionsServiceClient} = require('@google-cloud/functions'); -const client = new CloudFunctionsServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert(stdout, stdout !== null); - }); -}); diff --git a/packages/google-cloud-gdchardwaremanagement/samples/test/quickstart.js b/packages/google-cloud-gdchardwaremanagement/samples/test/quickstart.js deleted file mode 100644 index dcd2c7144b79..000000000000 --- a/packages/google-cloud-gdchardwaremanagement/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {GDCHardwareManagementClient} = - require('@google-cloud/gdchardwaremanagement').v1alpha; -const gdchardwaremanagementClient = new GDCHardwareManagementClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await gdchardwaremanagementClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-gkebackup/samples/test/quickstart.js b/packages/google-cloud-gkebackup/samples/test/quickstart.js deleted file mode 100644 index 7134569164e8..000000000000 --- a/packages/google-cloud-gkebackup/samples/test/quickstart.js +++ /dev/null @@ -1,50 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {BackupForGKEClient} = require('@google-cloud/gke-backup'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new BackupForGKEClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(stdout !== null); - }); -}); diff --git a/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js b/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js deleted file mode 100644 index 77215edc24ef..000000000000 --- a/packages/google-cloud-gkeconnect-gateway/samples/test/quickstart.js +++ /dev/null @@ -1,35 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const stdout = execSync('node ./quickstart.js', {cwd}); - assert.equal(stdout, false); - }); -}); diff --git a/packages/google-cloud-gkehub/samples/test/quickstart.js b/packages/google-cloud-gkehub/samples/test/quickstart.js deleted file mode 100644 index 1a3743a5fdf1..000000000000 --- a/packages/google-cloud-gkehub/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {GkeHubClient} = require('@google-cloud/gke-hub'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new GkeHubClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} global`, {cwd}); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-gkemulticloud/samples/test/quickstart.js b/packages/google-cloud-gkemulticloud/samples/test/quickstart.js deleted file mode 100644 index 90aa066533a7..000000000000 --- a/packages/google-cloud-gkemulticloud/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; -const gkemulticloudClient = new AwsClustersClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await gkemulticloudClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-west1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-gsuiteaddons/samples/test/quickstart.js b/packages/google-cloud-gsuiteaddons/samples/test/quickstart.js deleted file mode 100644 index dd49abe7bf3f..000000000000 --- a/packages/google-cloud-gsuiteaddons/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1; -const gsuiteaddonsClient = new GSuiteAddOnsClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await gsuiteaddonsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-iap/samples/test/quickstart.js b/packages/google-cloud-iap/samples/test/quickstart.js deleted file mode 100644 index 663f2d2d94f2..000000000000 --- a/packages/google-cloud-iap/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {IdentityAwareProxyOAuthServiceClient} = require('@google-cloud/iap'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new IdentityAwareProxyOAuthServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert(stdout.includes('brands'), true); - }); -}); diff --git a/packages/google-cloud-ids/samples/test/quickstart.js b/packages/google-cloud-ids/samples/test/quickstart.js deleted file mode 100644 index 1ff8bc053126..000000000000 --- a/packages/google-cloud-ids/samples/test/quickstart.js +++ /dev/null @@ -1,48 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {IDSClient} = require('@google-cloud/ids'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new IDSClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-east1-b`, - {cwd} - ); - assert.strictEqual(stdout, ''); - }); -}); diff --git a/packages/google-cloud-kms-inventory/samples/test/quickstart.js b/packages/google-cloud-kms-inventory/samples/test/quickstart.js deleted file mode 100644 index 8c8132e6acdb..000000000000 --- a/packages/google-cloud-kms-inventory/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {KeyDashboardServiceClient} = require('@google-cloud/kms-inventory').v1; -const inventoryClient = new KeyDashboardServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await inventoryClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-kms/samples/test/quickstart.js b/packages/google-cloud-kms/samples/test/quickstart.js deleted file mode 100644 index 8e3cdbb809c6..000000000000 --- a/packages/google-cloud-kms/samples/test/quickstart.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {describe, it, before, beforeEach, afterEach} = require('mocha'); -const {assert} = require('chai'); - -const {KeyManagementServiceClient} = require('@google-cloud/kms'); -const client = new KeyManagementServiceClient(); - -const locationId = 'us-east1'; -const originalConsoleLog = console.log; - -describe('Cloud KMS samples', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - - beforeEach(async () => { - console.log = () => {}; - }); - - afterEach(async () => { - console.log = originalConsoleLog; - }); - - it('quickstarts', async () => { - const sample = require('../quickstart'); - const keyRings = await sample.main(projectId, locationId); - - assert.isNotEmpty(keyRings); - }); -}); diff --git a/packages/google-cloud-language/samples/test/quickstart.js b/packages/google-cloud-language/samples/test/quickstart.js deleted file mode 100644 index 03c14cdee9a4..000000000000 --- a/packages/google-cloud-language/samples/test/quickstart.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('quickstart', () => { - it('should analyze sentiment in text', async () => { - const stdout = execSync('node quickstart.js'); - assert(stdout, /Text: Hello, world!/); - assert(stdout, /Sentiment score: /); - assert(stdout, /Sentiment magnitude: /); - }); -}); diff --git a/packages/google-cloud-lifesciences/samples/test/quickstart.js b/packages/google-cloud-lifesciences/samples/test/quickstart.js deleted file mode 100644 index 7730a3f226e0..000000000000 --- a/packages/google-cloud-lifesciences/samples/test/quickstart.js +++ /dev/null @@ -1,39 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const assert = require('assert'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - assert.throws(() => { - execSync( - 'node ./quickstart.js long-door-651 us-central1 15945335513149178558', - {cwd} - ); - }, /NOT_FOUND/); - }); -}); diff --git a/packages/google-cloud-lustre/samples/test/quickstart.js b/packages/google-cloud-lustre/samples/test/quickstart.js deleted file mode 100644 index f301d652fc05..000000000000 --- a/packages/google-cloud-lustre/samples/test/quickstart.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {LustreClient} = require('@google-cloud/lustre').v1; -const lustreClient = new LustreClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await lustreClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/-`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-maintenance-api/samples/test/quickstart.js b/packages/google-cloud-maintenance-api/samples/test/quickstart.js deleted file mode 100644 index 3dfcdd2f9fe3..000000000000 --- a/packages/google-cloud-maintenance-api/samples/test/quickstart.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const { MaintenanceClient } = require('@google-cloud/maintenance-api').v1beta; -const maintenanceClient = new MaintenanceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await maintenanceClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js projects/${projectId}/locations/us-central1`, {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-managedidentities/samples/test/quickstart.js b/packages/google-cloud-managedidentities/samples/test/quickstart.js deleted file mode 100644 index e4adca7ca3c6..000000000000 --- a/packages/google-cloud-managedidentities/samples/test/quickstart.js +++ /dev/null @@ -1,46 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const { - ManagedIdentitiesServiceClient, -} = require('@google-cloud/managed-identities'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ManagedIdentitiesServiceClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert(stdout, stdout.match(/\[\]/)); - }); -}); diff --git a/packages/google-cloud-managedkafka/samples/test/quickstart.js b/packages/google-cloud-managedkafka/samples/test/quickstart.js deleted file mode 100644 index fdb84028f0e2..000000000000 --- a/packages/google-cloud-managedkafka/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ManagedKafkaClient} = require('@google-cloud/managedkafka').v1; -const managedkafkaClient = new ManagedKafkaClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await managedkafkaClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-mediatranslation/samples/test/quickstart.js b/packages/google-cloud-mediatranslation/samples/test/quickstart.js deleted file mode 100644 index 445e1c71253d..000000000000 --- a/packages/google-cloud-mediatranslation/samples/test/quickstart.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const execSync = require('child_process').execSync; -const cmd = 'node quickstart.js'; - -const filePath = path.join(__dirname, '..', 'resources/audio.raw'); -const exec = cmd => execSync(cmd, {encoding: 'utf-8'}); - -describe('Quickstart', () => { - it('should translate from a streamed file', async () => { - const stdout = exec(`${cmd} ${filePath} linear16 en-US es-ES`); - assert.include(stdout, 'Partial translation'); - }); -}); diff --git a/packages/google-cloud-memcache/samples/test/quickstart.js b/packages/google-cloud-memcache/samples/test/quickstart.js deleted file mode 100644 index b86dffd0f7b8..000000000000 --- a/packages/google-cloud-memcache/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {CloudMemcacheClient} = require('@google-cloud/memcache').v1; -const memcacheClient = new CloudMemcacheClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Sample Integration Tests', () => { - let projectId; - before(async () => { - projectId = await memcacheClient.getProjectId(); - }); - it('should run quickstart.js', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - { - cwd, - } - ); - - assert(stdout !== null); - }); -}); diff --git a/packages/google-cloud-memorystore/samples/test/quickstart.js b/packages/google-cloud-memorystore/samples/test/quickstart.js deleted file mode 100644 index d3cc95b6a97d..000000000000 --- a/packages/google-cloud-memorystore/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {MemorystoreClient} = require('@google-cloud/memorystore').v1; -const memorystoreClient = new MemorystoreClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await memorystoreClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-metastore/samples/test/quickstart.js b/packages/google-cloud-metastore/samples/test/quickstart.js deleted file mode 100644 index 7403d55c9c67..000000000000 --- a/packages/google-cloud-metastore/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {DataprocMetastoreClient} = require('@google-cloud/dataproc-metastore'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new DataprocMetastoreClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, { - cwd, - }); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-migrationcenter/samples/test/quickstart.js b/packages/google-cloud-migrationcenter/samples/test/quickstart.js deleted file mode 100644 index e1ee19947fd0..000000000000 --- a/packages/google-cloud-migrationcenter/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1; -const migrationcenterClient = new MigrationCenterClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await migrationcenterClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-modelarmor/samples/test/quickstart.js b/packages/google-cloud-modelarmor/samples/test/quickstart.js deleted file mode 100644 index bc95eef514dd..000000000000 --- a/packages/google-cloud-modelarmor/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ModelArmorClient} = require('@google-cloud/modelarmor').v1; -const modelarmorClient = new ModelArmorClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await modelarmorClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1 modelarmor.us-central1.rep.googleapis.com`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.js b/packages/google-cloud-monitoring/samples/test/quickstart.js deleted file mode 100644 index b87cf5c8e99d..000000000000 --- a/packages/google-cloud-monitoring/samples/test/quickstart.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const cp = require('child_process'); -const monitoring = require('@google-cloud/monitoring'); - -const client = new monitoring.AlertPolicyServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -// Tests in this suite can trigger the upstream error, -// "points were written more frequently than the maximum -// sampling period configured for the metric": -const delay = async test => { - const retries = test.currentRetry(); - if (retries === 0) return; // no retry on the first failure. - // see: https://cloud.google.com/storage/docs/exponential-backoff: - const ms = Math.pow(2, retries) * 250 + Math.random() * 1000; - return new Promise(done => { - console.info(`retrying "${test.title}" in ${ms}ms`); - setTimeout(done, ms); - }); -}; -describe('quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - it('should run the quickstart', async function () { - this.retries(8); - await delay(this.test); // delay the start of the test, if this is a retry. - const result = execSync(`node quickstart.js ${projectId}`); - assert.match(result, /Done writing time series data/); - }); -}); diff --git a/packages/google-cloud-netapp/samples/test/quickstart.js b/packages/google-cloud-netapp/samples/test/quickstart.js deleted file mode 100644 index 43fed5cfcb12..000000000000 --- a/packages/google-cloud-netapp/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {NetAppClient} = require('@google-cloud/netapp').v1; -const netappClient = new NetAppClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await netappClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-networkconnectivity/samples/test/quickstart.js b/packages/google-cloud-networkconnectivity/samples/test/quickstart.js deleted file mode 100644 index 03c41a7a85c2..000000000000 --- a/packages/google-cloud-networkconnectivity/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {HubServiceClient} = require('@google-cloud/network-connectivity'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new HubServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} global`, {cwd}); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-networkmanagement/samples/test/quickstart.js b/packages/google-cloud-networkmanagement/samples/test/quickstart.js deleted file mode 100644 index 4bdaa6491bbb..000000000000 --- a/packages/google-cloud-networkmanagement/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {ReachabilityServiceClient} = require('@google-cloud/network-management'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ReachabilityServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /\[\S*\]/); - }); -}); diff --git a/packages/google-cloud-networksecurity/samples/test/quickstart.js b/packages/google-cloud-networksecurity/samples/test/quickstart.js deleted file mode 100644 index 03ffa0209e4c..000000000000 --- a/packages/google-cloud-networksecurity/samples/test/quickstart.js +++ /dev/null @@ -1,46 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {NetworkSecurityClient} = require('@google-cloud/network-security'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new NetworkSecurityClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert.notStrictEqual(stdout, null); - }); -}); diff --git a/packages/google-cloud-networkservices/samples/test/quickstart.js b/packages/google-cloud-networkservices/samples/test/quickstart.js deleted file mode 100644 index 28b0985b5dda..000000000000 --- a/packages/google-cloud-networkservices/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {NetworkServicesClient} = require('@google-cloud/networkservices').v1; -const networkservicesClient = new NetworkServicesClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await networkservicesClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-notebooks/samples/test/quickstart.js b/packages/google-cloud-notebooks/samples/test/quickstart.js deleted file mode 100644 index 0d2b6e3ff950..000000000000 --- a/packages/google-cloud-notebooks/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {NotebookServiceClient} = require('@google-cloud/notebooks'); -const client = new NotebookServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js ${projectId} us-west1-b`, { - cwd, - }); - assert.match(output, /instance: projects/); - }); -}); diff --git a/packages/google-cloud-oracledatabase/samples/test/quickstart.js b/packages/google-cloud-oracledatabase/samples/test/quickstart.js deleted file mode 100644 index c096667c4425..000000000000 --- a/packages/google-cloud-oracledatabase/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {OracleDatabaseClient} = require('@google-cloud/oracledatabase').v1; -const oracledatabaseClient = new OracleDatabaseClient({fallback: 'rest'}); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await oracledatabaseClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-east4`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js b/packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js deleted file mode 100644 index be299d4e4b23..000000000000 --- a/packages/google-cloud-orchestration-airflow-service/samples/test/quickstart.js +++ /dev/null @@ -1,48 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ImageVersionsClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert(stdout, stdout !== null); - }); -}); diff --git a/packages/google-cloud-orgpolicy/samples/test/quickstart.js b/packages/google-cloud-orgpolicy/samples/test/quickstart.js deleted file mode 100644 index 010f0af88be3..000000000000 --- a/packages/google-cloud-orgpolicy/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {OrgPolicyClient} = require('@google-cloud/org-policy'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new OrgPolicyClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /\[[\s\S]*\]/); - }); -}); diff --git a/packages/google-cloud-osconfig/samples/test/quickstart.js b/packages/google-cloud-osconfig/samples/test/quickstart.js deleted file mode 100644 index 2bfec0412d68..000000000000 --- a/packages/google-cloud-osconfig/samples/test/quickstart.js +++ /dev/null @@ -1,39 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {OsConfigServiceClient} = require('@google-cloud/os-config'); -const client = new OsConfigServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /found [0-9]+ deployments/); - }); -}); diff --git a/packages/google-cloud-oslogin/samples/test/quickstart.js b/packages/google-cloud-oslogin/samples/test/quickstart.js deleted file mode 100644 index 72d20cfd9028..000000000000 --- a/packages/google-cloud-oslogin/samples/test/quickstart.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const {execSync} = require('child_process'); - -const exec = cmd => execSync(cmd, {encoding: 'utf8'}); - -describe('sample tests', () => { - it('should run the quickstart', () => { - const output = exec( - 'node quickstart users/kokoro-system-test@long-door-651.iam.gserviceaccount.com' - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-parallelstore/samples/test/quickstart.js b/packages/google-cloud-parallelstore/samples/test/quickstart.js deleted file mode 100644 index 0ccf2d01168b..000000000000 --- a/packages/google-cloud-parallelstore/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ParallelstoreClient} = require('@google-cloud/parallelstore').v1beta; -const parallelstoreClient = new ParallelstoreClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await parallelstoreClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1-a`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-parametermanager/samples/test/quickstart.js b/packages/google-cloud-parametermanager/samples/test/quickstart.js deleted file mode 100644 index 17cc4253a7e3..000000000000 --- a/packages/google-cloud-parametermanager/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ParameterManagerClient} = require('@google-cloud/parametermanager').v1; -const parametermanagerClient = new ParameterManagerClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await parametermanagerClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-phishingprotection/samples/test/quickstart.js b/packages/google-cloud-phishingprotection/samples/test/quickstart.js deleted file mode 100644 index 10e8807af4b2..000000000000 --- a/packages/google-cloud-phishingprotection/samples/test/quickstart.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const PROJECT_ID = '1046198160504'; -const URI = 'http://example.com'; - -describe('Quickstart', () => { - it('should run quickstart', async () => { - try { - execSync(`node ./quickstart.js ${URI} ${PROJECT_ID}`, {cwd}); - } catch (err) { - if (err.toString().match(/This submission was recently received/)) { - return; - } else { - throw err; - } - } - }); -}); diff --git a/packages/google-cloud-policysimulator/samples/test/quickstart.js b/packages/google-cloud-policysimulator/samples/test/quickstart.js deleted file mode 100644 index 3921f5b0da90..000000000000 --- a/packages/google-cloud-policysimulator/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -// const {SimulatorClient} = require('@google-cloud/policysimulator').v1; -// const policysimulatorClient = new SimulatorClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - // let projectId; - - before(async () => { - // projectId = await policysimulatorClient.getProjectId(); - }); - - it('should run quickstart', async () => { - // Skipping this test since it requires creating resources, which makes - // the test more likely to be flaky - // const output = execSync( - // `node ./quickstart.js projects/${projectId}/locations/global/replays/`, - // {cwd} - // ); - // assert(output !== null); - }); -}); diff --git a/packages/google-cloud-policytroubleshooter-iam/samples/test/quickstart.js b/packages/google-cloud-policytroubleshooter-iam/samples/test/quickstart.js deleted file mode 100644 index 751e992b4f12..000000000000 --- a/packages/google-cloud-policytroubleshooter-iam/samples/test/quickstart.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - try { - execSync('node ./quickstart.js', {cwd}); - } catch (err) { - // we expect failure due to unknown policy - // TODO: would be great to have a test that makes more sense - } - }); -}); diff --git a/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js b/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js deleted file mode 100644 index 02410235e489..000000000000 --- a/packages/google-cloud-policytroubleshooter/samples/test/quickstart.js +++ /dev/null @@ -1,46 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {IamCheckerClient} = require('@google-cloud/policy-troubleshooter'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new IamCheckerClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js example@example.com //cloudresourcemanager.googleapis.com/projects/${projectId} accessapproval.requests.approve`, - {cwd} - ); - assert.match(stdout, /'UNKNOWN_INFO_DENIED'/); - }); -}); diff --git a/packages/google-cloud-privatecatalog/samples/test/quickstart.js b/packages/google-cloud-privatecatalog/samples/test/quickstart.js deleted file mode 100644 index da556e832fd7..000000000000 --- a/packages/google-cloud-privatecatalog/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {PrivateCatalogClient} = require('@google-cloud/private-catalog'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new PrivateCatalogClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-privilegedaccessmanager/samples/test/quickstart.js b/packages/google-cloud-privilegedaccessmanager/samples/test/quickstart.js deleted file mode 100644 index 9cc50a4333ed..000000000000 --- a/packages/google-cloud-privilegedaccessmanager/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {PrivilegedAccessManagerClient} = - require('@google-cloud/privilegedaccessmanager').v1; -const privilegedaccessmanagerClient = new PrivilegedAccessManagerClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await privilegedaccessmanagerClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - { - cwd, - } - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-rapidmigrationassessment/samples/test/quickstart.js b/packages/google-cloud-rapidmigrationassessment/samples/test/quickstart.js deleted file mode 100644 index f519b4fab4af..000000000000 --- a/packages/google-cloud-rapidmigrationassessment/samples/test/quickstart.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const output = execSync('node ./quickstart.js', {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-recommender/samples/test/quickstart.js b/packages/google-cloud-recommender/samples/test/quickstart.js deleted file mode 100644 index 06f791ac4d2e..000000000000 --- a/packages/google-cloud-recommender/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {expect} = require('chai'); -const {before, describe, it} = require('mocha'); -const {RecommenderClient} = require('@google-cloud/recommender'); -const recommender = new RecommenderClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await recommender.getProjectId(); - }); - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - expect(stdout).to.include('recommendations for'); - }); -}); diff --git a/packages/google-cloud-redis-cluster/samples/test/quickstart.js b/packages/google-cloud-redis-cluster/samples/test/quickstart.js deleted file mode 100644 index 86f350669014..000000000000 --- a/packages/google-cloud-redis-cluster/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {CloudRedisClusterClient} = require('@google-cloud/redis-cluster').v1; -const clusterClient = new CloudRedisClusterClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await clusterClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-retail/samples/test/quickstart.js b/packages/google-cloud-retail/samples/test/quickstart.js deleted file mode 100644 index 5f93004506a4..000000000000 --- a/packages/google-cloud-retail/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {CatalogServiceClient} = require('@google-cloud/retail'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new CatalogServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} global`, {cwd}); - assert.match(stdout, /default_catalog/); - }); -}); diff --git a/packages/google-cloud-run/samples/test/quickstart.js b/packages/google-cloud-run/samples/test/quickstart.js deleted file mode 100644 index d46e4457539e..000000000000 --- a/packages/google-cloud-run/samples/test/quickstart.js +++ /dev/null @@ -1,55 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {ServicesClient} = require('@google-cloud/run'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new ServicesClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - try { - execSync( - 'node ./quickstart.js projects/long-door-651/locations/us-central1', - {cwd} - ); - } catch (err) { - // TODO: investigate why RPC calls return Operation is not implemented. - console.warn(err.message); - } - }); -}); diff --git a/packages/google-cloud-scheduler/samples/test/quickstart.js b/packages/google-cloud-scheduler/samples/test/quickstart.js deleted file mode 100644 index 60372d69ef88..000000000000 --- a/packages/google-cloud-scheduler/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {CloudSchedulerClient} = require('@google-cloud/scheduler').v1; -const schedulerClient = new CloudSchedulerClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await schedulerClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - { - cwd, - } - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-secretmanager/samples/test/quickstart.js b/packages/google-cloud-secretmanager/samples/test/quickstart.js deleted file mode 100644 index 3d231674cfdc..000000000000 --- a/packages/google-cloud-secretmanager/samples/test/quickstart.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const cp = require('child_process'); -const crypto = require('crypto'); -const {before, it, describe} = require('mocha'); -const {SecretManagerServiceClient} = require('@google-cloud/secret-manager'); -const client = new SecretManagerServiceClient(); - -const secretId = crypto.randomUUID(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('Secret Manager samples', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - - it('runs the quickstart', async () => { - const stdout = execSync( - `node quickstart.js projects/${projectId} ${secretId}-quickstart bar` - ); - assert(stdout !== null); - }); -}); diff --git a/packages/google-cloud-securesourcemanager/samples/test/quickstart.js b/packages/google-cloud-securesourcemanager/samples/test/quickstart.js deleted file mode 100644 index dff3bd96f8e9..000000000000 --- a/packages/google-cloud-securesourcemanager/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {SecureSourceManagerClient} = - require('@google-cloud/securesourcemanager').v1; -const securesourcemanagerClient = new SecureSourceManagerClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await securesourcemanagerClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-security-privateca/samples/test/quickstart.js b/packages/google-cloud-security-privateca/samples/test/quickstart.js deleted file mode 100644 index df06bacda40a..000000000000 --- a/packages/google-cloud-security-privateca/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -'use strict'; - -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const { - CertificateAuthorityServiceClient, -} = require('@google-cloud/security-private-ca'); - -const client = new CertificateAuthorityServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - // eslint-disable-next-line no-unused-vars - const stdout = execSync( - `node ./quickstart.js ${projectId} 'us-central1' 'test-ca'` - ); - assert.equal(stdout, ''); - }); -}); diff --git a/packages/google-cloud-security-publicca/samples/test/quickstart.js b/packages/google-cloud-security-publicca/samples/test/quickstart.js deleted file mode 100644 index 5210c3dfd931..000000000000 --- a/packages/google-cloud-security-publicca/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {PublicCertificateAuthorityServiceClient} = - require('@google-cloud/publicca').v1beta1; -const publiccaClient = new PublicCertificateAuthorityServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await publiccaClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-securitycenter/samples/test/quickstart.js b/packages/google-cloud-securitycenter/samples/test/quickstart.js deleted file mode 100644 index 443a12346d0d..000000000000 --- a/packages/google-cloud-securitycenter/samples/test/quickstart.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// eslint-disable-next-line node/no-unpublished-require -const {assert} = require('chai'); -// eslint-disable-next-line node/no-unpublished-require -const {describe, it} = require('mocha'); -const {execSync} = require('child_process'); -const exec = cmd => execSync(cmd, {encoding: 'utf8'}); - -describe('quickstart', () => { - it('should print all sources in project', () => { - const output = exec('node quickstart.js'); - assert.match(output, /sources listed/); - }); -}); diff --git a/packages/google-cloud-securitycentermanagement/samples/test/quickstart.js b/packages/google-cloud-securitycentermanagement/samples/test/quickstart.js deleted file mode 100644 index ea4b105db80f..000000000000 --- a/packages/google-cloud-securitycentermanagement/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {SecurityCenterManagementClient} = - require('@google-cloud/securitycentermanagement').v1; - -// Instantiates a client -const securitycentermanagementClient = new SecurityCenterManagementClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await securitycentermanagementClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-servicedirectory/samples/test/quickstart.js b/packages/google-cloud-servicedirectory/samples/test/quickstart.js deleted file mode 100644 index d7eacfc8d5ab..000000000000 --- a/packages/google-cloud-servicedirectory/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -'use strict'; - -const path = require('path'); -const assert = require('assert'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {RegistrationServiceClient} = require('@google-cloud/service-directory'); -const registrationServiceClient = new RegistrationServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const locationId = 'us-central1'; - -describe('Service Directory Quickstart', () => { - let projectId; - before(async () => { - projectId = await registrationServiceClient.getProjectId(); - }); - it('should run quickstart.js', async () => { - const stdout = execSync(`node quickstart.js ${projectId} ${locationId}`, { - cwd, - }); - // build should have exited with success status. - assert(stdout !== null); - }); -}); diff --git a/packages/google-cloud-servicehealth/samples/test/quickstart.js b/packages/google-cloud-servicehealth/samples/test/quickstart.js deleted file mode 100644 index daf9158086f0..000000000000 --- a/packages/google-cloud-servicehealth/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ServiceHealthClient} = require('@google-cloud/servicehealth').v1; -const servicehealthClient = new ServiceHealthClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await servicehealthClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global 1`, - {cwd}, - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-shell/samples/test/quickstart.js b/packages/google-cloud-shell/samples/test/quickstart.js deleted file mode 100644 index 86410163dbaf..000000000000 --- a/packages/google-cloud-shell/samples/test/quickstart.js +++ /dev/null @@ -1,34 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const stdout = execSync('node ./quickstart.js', {cwd}); - assert.match(stdout, /ServiceClientImpl/); - }); -}); diff --git a/packages/google-cloud-speech/samples/test/quickstart.js b/packages/google-cloud-speech/samples/test/quickstart.js deleted file mode 100644 index 22c436f12e7e..000000000000 --- a/packages/google-cloud-speech/samples/test/quickstart.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/* eslint-disable */ - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); -const text = 'how old is the Brooklyn Bridge'; - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const stdout = execSync('node quickstart.js', {cwd}); - assert.match(stdout, new RegExp(`Transcription: ${text}`)); - }); -}); \ No newline at end of file diff --git a/packages/google-cloud-sql/samples/test/quickstart.js b/packages/google-cloud-sql/samples/test/quickstart.js deleted file mode 100644 index f519b4fab4af..000000000000 --- a/packages/google-cloud-sql/samples/test/quickstart.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const output = execSync('node ./quickstart.js', {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-storagebatchoperations/samples/test/quickstart.js b/packages/google-cloud-storagebatchoperations/samples/test/quickstart.js deleted file mode 100644 index eadb883128a9..000000000000 --- a/packages/google-cloud-storagebatchoperations/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {StorageBatchOperationsClient} = - require('@google-cloud/storagebatchoperations').v1; -const storagebatchoperationsClient = new StorageBatchOperationsClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await storagebatchoperationsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/global`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-storageinsights/samples/test/quickstart.js b/packages/google-cloud-storageinsights/samples/test/quickstart.js deleted file mode 100644 index 8ad50d129372..000000000000 --- a/packages/google-cloud-storageinsights/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; -const storageinsightsClient = new StorageInsightsClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await storageinsightsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-support/samples/test/quickstart.js b/packages/google-cloud-support/samples/test/quickstart.js deleted file mode 100644 index 3c78c0e03fb5..000000000000 --- a/packages/google-cloud-support/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {CommentServiceClient} = require('@google-cloud/support').v2; -const cloudsupportClient = new CommentServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await cloudsupportClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-talent/samples/test/quickstart.js b/packages/google-cloud-talent/samples/test/quickstart.js deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/google-cloud-tasks/samples/test/quickstart.js b/packages/google-cloud-tasks/samples/test/quickstart.js deleted file mode 100644 index a3cec4bbe4cf..000000000000 --- a/packages/google-cloud-tasks/samples/test/quickstart.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const {describe, it, before} = require('mocha'); -const {execSync} = require('child_process'); -const {CloudTasksClient} = require('@google-cloud/tasks').v2; -const client = new CloudTasksClient(); - -describe('Cloud Task Sample Tests', async () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('quickstart sample should list tasks', async () => { - const stdout = execSync( - `node quickstart.js projects/${projectId}/locations/us-central1` - ); - assert.ok(stdout !== null); - }); -}); diff --git a/packages/google-cloud-telcoautomation/samples/test/quickstart.js b/packages/google-cloud-telcoautomation/samples/test/quickstart.js deleted file mode 100644 index 29ebf5247fe5..000000000000 --- a/packages/google-cloud-telcoautomation/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {TelcoAutomationClient} = require('@google-cloud/telcoautomation').v1; -const telcoautomationClient = new TelcoAutomationClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await telcoautomationClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-texttospeech/samples/test/quickstart.js b/packages/google-cloud-texttospeech/samples/test/quickstart.js deleted file mode 100644 index ce6106efbcff..000000000000 --- a/packages/google-cloud-texttospeech/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const fs = require('fs'); -const {assert} = require('chai'); -const {describe, it, after} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const outputFile = 'output.mp3'; - -describe('quickstart', () => { - after(() => { - try { - fs.unlinkSync(outputFile); - } catch (err) { - // Ignore error - } - }); - - it('should synthesize speech to local mp3 file', () => { - assert.strictEqual(fs.existsSync(outputFile), false); - const stdout = execSync('node quickstart'); - assert.match(stdout, /Audio content written to file: output.mp3/); - assert.ok(fs.existsSync(outputFile)); - }); -}); diff --git a/packages/google-cloud-tpu/samples/test/quickstart.js b/packages/google-cloud-tpu/samples/test/quickstart.js deleted file mode 100644 index 36a1f2e968c2..000000000000 --- a/packages/google-cloud-tpu/samples/test/quickstart.js +++ /dev/null @@ -1,47 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {TpuClient} = require('@google-cloud/tpu'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new TpuClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} us-central1-a`, { - cwd, - }); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-translate/samples/test/quickstart.js b/packages/google-cloud-translate/samples/test/quickstart.js deleted file mode 100644 index 087673ef6b32..000000000000 --- a/packages/google-cloud-translate/samples/test/quickstart.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); -const path = require('path'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); -const projectId = process.env.GCLOUD_PROJECT; - -describe('quickstart sample tests', () => { - it('should translate a string', async () => { - const stdout = execSync(`node quickstart ${projectId}`, {cwd}); - assert.include(stdout, 'Translation: Привет'); - }); -}); diff --git a/packages/google-cloud-video-livestream/samples/test/quickstart.js b/packages/google-cloud-video-livestream/samples/test/quickstart.js deleted file mode 100644 index 94cd632dc4db..000000000000 --- a/packages/google-cloud-video-livestream/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const path = require('path'); -// const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// const {LivestreamServiceClient} = require('@google-cloud/vmmigration').v1; - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// const client = new LivestreamServiceClient(); - -describe('Quickstart', () => { - // let projectId; - - before(async () => { - // projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - // API must be allow listed: - // Should have 0 exit code, and therefore not throw: - // execSync(`node ./quickstart.js projects/${projectId}/locations/global`, { - // cwd, - // }); - }); -}); diff --git a/packages/google-cloud-video-stitcher/samples/test/quickstart.js b/packages/google-cloud-video-stitcher/samples/test/quickstart.js deleted file mode 100644 index 073e774bc3a6..000000000000 --- a/packages/google-cloud-video-stitcher/samples/test/quickstart.js +++ /dev/null @@ -1,50 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new VideoStitcherServiceClient(); - -describe('Quickstart', () => { - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(stdout, stdout !== null); - }); -}); diff --git a/packages/google-cloud-video-transcoder/samples/test/quickstart.js b/packages/google-cloud-video-transcoder/samples/test/quickstart.js deleted file mode 100644 index 0cf42b9753b1..000000000000 --- a/packages/google-cloud-video-transcoder/samples/test/quickstart.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const assert = require('assert'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1; -const client = new TranscoderServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js ${projectId} us-west1`, { - cwd, - }); - assert(output.match(/jobs:/)); - }); -}); diff --git a/packages/google-cloud-videointelligence/samples/test/quickstart.js b/packages/google-cloud-videointelligence/samples/test/quickstart.js deleted file mode 100644 index adcd355b09a4..000000000000 --- a/packages/google-cloud-videointelligence/samples/test/quickstart.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cmd = 'node quickstart.js'; -const cwd = path.join(__dirname, '..'); - -describe('quickstart samples', () => { - it('should analyze a hardcoded video', async () => { - const stdout = execSync(cmd, {cwd}); - assert.match(stdout, /medium sized cats/); - }); -}); diff --git a/packages/google-cloud-vision/samples/test/quickstart.js b/packages/google-cloud-vision/samples/test/quickstart.js deleted file mode 100644 index 7cc2bfac70ae..000000000000 --- a/packages/google-cloud-vision/samples/test/quickstart.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const cp = require('child_process'); -// Imports the Vision library -const {ProductSearchClient} = require('@google-cloud/vision').v1p4beta1; -const visionClient = new ProductSearchClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('quickstart', async () => { - let projectId; - before(async () => { - projectId = await visionClient.getProjectId(); - }); - it('should detect labels in a remote file', async () => { - const stdout = execSync( - `node quickstart.js projects/${projectId}/locations/us-west1` - ); - assert.ok(stdout !== null); - }); -}); diff --git a/packages/google-cloud-vmmigration/samples/test/quickstart.js b/packages/google-cloud-vmmigration/samples/test/quickstart.js deleted file mode 100644 index 814f40b16eea..000000000000 --- a/packages/google-cloud-vmmigration/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {VmMigrationClient} = require('@google-cloud/vmmigration').v1; - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new VmMigrationClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - // Should have 0 exit code, and therefore not throw: - execSync(`node ./quickstart.js projects/${projectId}/locations/global`, { - cwd, - }); - }); -}); diff --git a/packages/google-cloud-vmwareengine/samples/test/quickstart.js b/packages/google-cloud-vmwareengine/samples/test/quickstart.js deleted file mode 100644 index e7201f1302d3..000000000000 --- a/packages/google-cloud-vmwareengine/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {VmwareEngineClient} = require('@google-cloud/vmwareengine').v1; -const vmwareengineClient = new VmwareEngineClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await vmwareengineClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-cloud-vpcaccess/samples/test/quickstart.js b/packages/google-cloud-vpcaccess/samples/test/quickstart.js deleted file mode 100644 index f981be827736..000000000000 --- a/packages/google-cloud-vpcaccess/samples/test/quickstart.js +++ /dev/null @@ -1,50 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const {VpcAccessServiceClient} = require('@google-cloud/vpc-access'); -// eslint-disable-next-line no-unused-vars, node/no-missing-require -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new VpcAccessServiceClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - // eslint-disable-next-line no-unused-vars - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, { - cwd, - }); - assert.match(stdout, /\[\]/); - }); -}); diff --git a/packages/google-cloud-webrisk/samples/test/quickstart.js b/packages/google-cloud-webrisk/samples/test/quickstart.js deleted file mode 100644 index ae41d8f6182d..000000000000 --- a/packages/google-cloud-webrisk/samples/test/quickstart.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); -const url = 'http://testsafebrowsing.appspot.com/s/malware.html'; - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const stdout = execSync(`node quickstart.js ${url}`, {cwd}); - assert.include(stdout, 'MALWARE'); - }); -}); diff --git a/packages/google-cloud-websecurityscanner/samples/test/quickstart.js b/packages/google-cloud-websecurityscanner/samples/test/quickstart.js deleted file mode 100644 index 3690c714a376..000000000000 --- a/packages/google-cloud-websecurityscanner/samples/test/quickstart.js +++ /dev/null @@ -1,50 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -// eslint-disable-next-line node/no-missing-require -const { - WebSecurityScannerClient, -} = require('@google-cloud/web-security-scanner'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new WebSecurityScannerClient(); - -describe('Quickstart', () => { - //TODO: remove this if not using the projectId - let projectId; - - before(async () => { - // eslint-disable-next-line no-unused-vars - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, { - cwd, - }); - assert(stdout, stdout.match(/\[\]/)); - }); -}); diff --git a/packages/google-cloud-workflows/samples/test/quickstart.js b/packages/google-cloud-workflows/samples/test/quickstart.js deleted file mode 100644 index d75119ce0c68..000000000000 --- a/packages/google-cloud-workflows/samples/test/quickstart.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const assert = require('assert'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {WorkflowsClient} = require('@google-cloud/workflows'); -const client = new WorkflowsClient(); - -const execSync = (cmd) => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - before(async () => { - projectId = await client.getProjectId(); - }); - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js ${projectId} us-central1`, { - cwd, - }); - assert(output.match(/name: projects.*/)); - }); -}); diff --git a/packages/google-cloud-workstations/samples/test/quickstart.js b/packages/google-cloud-workstations/samples/test/quickstart.js deleted file mode 100644 index 83c489d7f278..000000000000 --- a/packages/google-cloud-workstations/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {WorkstationsClient} = require('@google-cloud/workstations').v1beta; -const workstationsClient = new WorkstationsClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await workstationsClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1/workstationClusters/cluster-lfha52bg/workstationConfigs/config-lfhb2xoh`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-container/samples/test/quickstart.js b/packages/google-container/samples/test/quickstart.js deleted file mode 100644 index 3d92cb4a578e..000000000000 --- a/packages/google-container/samples/test/quickstart.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it} = require('mocha'); -const cp = require('child_process'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('container samples - quickstart', () => { - it('should run the quickstart', async () => { - const stdout = execSync('node quickstart'); - assert.match(stdout, /Clusters:/); - }); -}); diff --git a/packages/google-dataflow/samples/test/quickstart.js b/packages/google-dataflow/samples/test/quickstart.js deleted file mode 100644 index 9d8816c42441..000000000000 --- a/packages/google-dataflow/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {TemplatesServiceClient} = require('@google-cloud/dataflow'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -const client = new TemplatesServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId}`, {cwd}); - assert.match(stdout, /status: null/); - }); -}); diff --git a/packages/google-devtools-artifactregistry/samples/test/quickstart.js b/packages/google-devtools-artifactregistry/samples/test/quickstart.js deleted file mode 100644 index fffeb7812285..000000000000 --- a/packages/google-devtools-artifactregistry/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const path = require('path'); -const cp = require('child_process'); -const {before, describe, it} = require('mocha'); -const {ArtifactRegistryClient} = require('@google-cloud/artifact-registry'); -const {assert} = require('chai'); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const location = 'us-central1'; - -const cwd = path.join(__dirname, '..'); - -const client = new ArtifactRegistryClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - - it('should run quickstart', async () => { - const stdout = execSync(`node ./quickstart.js ${projectId} ${location}`, { - cwd, - }); - assert(stdout, stdout.match(/\[\]/)); - }); -}); diff --git a/packages/google-devtools-cloudbuild/samples/test/quickstart.js b/packages/google-devtools-cloudbuild/samples/test/quickstart.js deleted file mode 100644 index baf7389082f9..000000000000 --- a/packages/google-devtools-cloudbuild/samples/test/quickstart.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const cp = require('child_process'); -const {CloudBuildClient} = require('@google-cloud/cloudbuild'); -const cb = new CloudBuildClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -// Use list-build-triggers.js to figure out the ID of the trigger -// you would like to execute. -const TRIGGER_ID = - process.env.TRIGGER || 'c9033094-51a9-44c5-b3a0-1d882deb4464'; - -describe('Sample Integration Tests', () => { - let projectId; - - before(async () => { - projectId = await cb.getProjectId(); - }); - it('should run quickstart.js', async () => { - const stdout = execSync( - `node ./quickstart.js ${projectId} ${TRIGGER_ID} cloud-build-mvp`, - {cwd} - ); - // build should have exited with success status. - assert.include(stdout, 'status: Success'); - }); -}); diff --git a/packages/google-devtools-cloudprofiler/samples/test/quickstart.js b/packages/google-devtools-cloudprofiler/samples/test/quickstart.js deleted file mode 100644 index ef29b2657231..000000000000 --- a/packages/google-devtools-cloudprofiler/samples/test/quickstart.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -// const {ProfilerServiceClient} = require('@google-cloud/cloudprofiler').v2; -// const cloudprofilerClient = new ProfilerServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - // let projectId; - - before(async () => { - // projectId = await cloudprofilerClient.getProjectId(); - }); - - it('should run quickstart', async () => { - // This library doesn't contain a list method, which would - // make testing the API least resource-intensive. We're going to - // skip for now. - // const output = execSync( - // `node ./quickstart.js projects/${projectId}/locations/us-central1`, - // {cwd} - // ); - // assert(output !== null); - }); -}); diff --git a/packages/google-devtools-containeranalysis/samples/test/quickstart.js b/packages/google-devtools-containeranalysis/samples/test/quickstart.js deleted file mode 100644 index f2f28e892dc9..000000000000 --- a/packages/google-devtools-containeranalysis/samples/test/quickstart.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const {describe, it, before} = require('mocha'); -const {execSync} = require('child_process'); -// eslint-disable-next-line node/no-missing-require -const {ContainerAnalysisClient} = require('@google-cloud/containeranalysis').v1; -const containeranalysisClient = new ContainerAnalysisClient(); - -const exec = cmd => execSync(cmd, {encoding: 'utf8'}); - -describe('quickstart', () => { - let projectId; - - before(async () => { - projectId = await containeranalysisClient.getProjectId(); - }); - - it('should run the quickstart', () => { - const stdout = exec(`node quickstart.js projects/${projectId}`); - assert(stdout !== null); - }); -}); diff --git a/packages/google-iam-credentials/samples/test/quickstart.js b/packages/google-iam-credentials/samples/test/quickstart.js deleted file mode 100644 index 93a4fbbcb85d..000000000000 --- a/packages/google-iam-credentials/samples/test/quickstart.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -'use strict'; - -const cp = require('child_process'); -const {describe, it} = require('mocha'); -const {assert} = require('chai'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const output = execSync( - 'node ./quickstart.js kokoro-system-test@long-door-651.iam.gserviceaccount.com https://www.googleapis.com/auth/iam' - ); - assert(output !== null); - }); -}); diff --git a/packages/google-iam/samples/test/quickstart.js b/packages/google-iam/samples/test/quickstart.js deleted file mode 100644 index c73bce272593..000000000000 --- a/packages/google-iam/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {PoliciesClient} = require('@google-cloud/iam').v2; -const iamClient = new PoliciesClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await iamClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js policies/cloudresourcemanager.googleapis.com%2Fprojects%2F${projectId}/denypolicies`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-identity-accesscontextmanager/samples/test/quickstart.js b/packages/google-identity-accesscontextmanager/samples/test/quickstart.js deleted file mode 100644 index bddcd2a9cb34..000000000000 --- a/packages/google-identity-accesscontextmanager/samples/test/quickstart.js +++ /dev/null @@ -1,26 +0,0 @@ -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const {describe, it} = require('mocha'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - // TODO: add test. - }); -}); diff --git a/packages/google-maps-addressvalidation/samples/test/quickstart.js b/packages/google-maps-addressvalidation/samples/test/quickstart.js deleted file mode 100644 index f519b4fab4af..000000000000 --- a/packages/google-maps-addressvalidation/samples/test/quickstart.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const output = execSync('node ./quickstart.js', {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-maps-areainsights/samples/test/quickstart.js b/packages/google-maps-areainsights/samples/test/quickstart.js deleted file mode 100644 index ddb40224ffce..000000000000 --- a/packages/google-maps-areainsights/samples/test/quickstart.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const output = execSync('node ./quickstart.js'); - assert(output !== null); - }); -}); diff --git a/packages/google-maps-fleetengine-delivery/samples/test/quickstart.js b/packages/google-maps-fleetengine-delivery/samples/test/quickstart.js deleted file mode 100644 index 6b4f1e4da15e..000000000000 --- a/packages/google-maps-fleetengine-delivery/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {DeliveryServiceClient} = require('@googlemaps/fleetengine-delivery').v1; -const fleetengineDeliveryClient = new DeliveryServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await fleetengineDeliveryClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js providers/${projectId}`, { - cwd, - }); - assert(output !== null); - }); -}); diff --git a/packages/google-maps-fleetengine/samples/test/quickstart.js b/packages/google-maps-fleetengine/samples/test/quickstart.js deleted file mode 100644 index 1e857750951c..000000000000 --- a/packages/google-maps-fleetengine/samples/test/quickstart.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const { VehicleServiceClient } = require('@googlemaps/fleetengine').v1; -const fleetengineClient = new VehicleServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await fleetengineClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js providers/${projectId}`, {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js b/packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js deleted file mode 100644 index 79e172860e9b..000000000000 --- a/packages/google-maps-mapsplatformdatasets/samples/test/quickstart.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); -// const {describe, it, before} = require('mocha'); -// // Imports the Mapsplatformdatasets library -// const {MapsPlatformDatasetsV1AlphaClient} = -// require('@google-cloud/mapsplatformdatasets').v1alpha; -// // Instantiates a client -// const mapsplatformdatasetsClient = new MapsPlatformDatasetsV1AlphaClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - // let projectId; - - // before(async () => { - // projectId = await mapsplatformdatasetsClient.getProjectId(); - // }); - - it('should run quickstart', async () => { - // NOTE: This API does not yet support project ID (vs. just project number) - // We should use projectId once they do. b/266963679 - // DEVELOPER: change this to your project number when running locally. - const output = execSync('node ./quickstart.js projects/1046198160504', { - cwd, - }); - assert(output !== null); - }); -}); diff --git a/packages/google-maps-places/samples/test/quickstart.js b/packages/google-maps-places/samples/test/quickstart.js deleted file mode 100644 index 1a7b2216218e..000000000000 --- a/packages/google-maps-places/samples/test/quickstart.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const output = execSync('node ./quickstart.js test', {cwd}); - assert(output !== null); - }); -}); diff --git a/packages/google-maps-routeoptimization/samples/test/quickstart.js b/packages/google-maps-routeoptimization/samples/test/quickstart.js deleted file mode 100644 index a6817e539646..000000000000 --- a/packages/google-maps-routeoptimization/samples/test/quickstart.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {RouteOptimizationClient} = require('@googlemaps/routeoptimization').v1; -const routeoptimizationClient = new RouteOptimizationClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await routeoptimizationClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - assert(output !== null); - }); -}); diff --git a/packages/google-maps-routing/samples/test/quickstart.js b/packages/google-maps-routing/samples/test/quickstart.js deleted file mode 100644 index 4d9679ffa387..000000000000 --- a/packages/google-maps-routing/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -// const {RoutesClient} = require('@googlemaps/routing').v2; -// const routingClient = new RoutesClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - // let projectId; - - before(async () => { - // projectId = await routingClient.getProjectId(); - }); - - it('should run quickstart', async () => { - // TODO(#3380) we should have a test for our quickstart sample. - // const output = execSync( - // `node ./quickstart.js projects/${projectId}/locations/us-central1`, - // {cwd} - // ); - // assert(output !== null); - }); -}); diff --git a/packages/google-maps-solar/samples/test/quickstart.js b/packages/google-maps-solar/samples/test/quickstart.js deleted file mode 100644 index 245e62a7bf36..000000000000 --- a/packages/google-maps-solar/samples/test/quickstart.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - // Google San Francisco - 345 Spear St - const location = { - latitude: 37.7900161, - longitude: -122.3900146, - }; - - const output = execSync( - `node ./quickstart.js '${JSON.stringify(location)}'`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/google-marketingplatform-admin/samples/test/quickstart.js b/packages/google-marketingplatform-admin/samples/test/quickstart.js deleted file mode 100644 index 558173b650e9..000000000000 --- a/packages/google-marketingplatform-admin/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Commenting out this test given that we can't use the admin organization (google) -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {MarketingplatformAdminServiceClient} = -// require('@google-ads/marketing-platform-admin').v1alpha; -// const marketingplatformadminapiClient = -// new MarketingplatformAdminServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await marketingplatformadminapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync('node ./quickstart.js organizations/google.com', { -// cwd, -// }); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-monitoring-dashboard/samples/test/quickstart.js b/packages/google-monitoring-dashboard/samples/test/quickstart.js deleted file mode 100644 index 128910f3e19d..000000000000 --- a/packages/google-monitoring-dashboard/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -'use strict'; - -const path = require('path'); -const {assert} = require('chai'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const { - DashboardsServiceClient, -} = require('@google-cloud/monitoring-dashboards'); - -// Creates a client -const ds = new DashboardsServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Sample Integration Tests', () => { - let projectId; - before(async () => { - projectId = await ds.getProjectId(); - }); - it('should run quickstart.js', async () => { - const stdout = execSync(`node ./quickstart.js projects/${projectId}`, { - cwd, - }); - // build should have exited with success status. - assert.include(stdout, 'Listing Dashboards'); - }); -}); diff --git a/packages/google-privacy-dlp/samples/test/quickstart.js b/packages/google-privacy-dlp/samples/test/quickstart.js deleted file mode 100644 index b419c526c58c..000000000000 --- a/packages/google-privacy-dlp/samples/test/quickstart.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const cp = require('child_process'); -const DLP = require('@google-cloud/dlp'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const client = new DLP.DlpServiceClient(); -describe('quickstart', () => { - let projectId; - - before(async () => { - projectId = await client.getProjectId(); - }); - it('should run', () => { - const output = execSync(`node quickstart.js ${projectId}`); - assert.match(output, /Info type: PERSON_NAME/); - }); -}); diff --git a/packages/google-shopping-css/samples/test/quickstart.js b/packages/google-shopping-css/samples/test/quickstart.js deleted file mode 100644 index 49e1e4a3c8ad..000000000000 --- a/packages/google-shopping-css/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -// const {CssProductsServiceClient} = require('@google-shopping/css').v1; -// const cssClient = new CssProductsServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - // projectId = await cssClient.getProjectId(); - }); - - it('should run quickstart', async () => { - // const output = execSync( - // `node ./quickstart.js projects/${projectId}/locations/us-central1`, - // {cwd} - // ); - // assert(output !== null); - }); -}); diff --git a/packages/google-shopping-merchant-accounts/samples/test/quickstart.js b/packages/google-shopping-merchant-accounts/samples/test/quickstart.js deleted file mode 100644 index 6dbd74b42170..000000000000 --- a/packages/google-shopping-merchant-accounts/samples/test/quickstart.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {describe, before} = require('mocha'); -const {UserServiceClient} = require('@google-shopping/accounts').v1beta; -const merchantapiClient = new UserServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await merchantapiClient.getProjectId(); - }); -}); diff --git a/packages/google-shopping-merchant-conversions/samples/test/quickstart.js b/packages/google-shopping-merchant-conversions/samples/test/quickstart.js deleted file mode 100644 index 530c775f1bde..000000000000 --- a/packages/google-shopping-merchant-conversions/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Commenting out test since it requires a merchant account -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {ConversionSourcesServiceClient} = -// require('@google-shopping/conversions').v1beta; -// const merchantapiClient = new ConversionSourcesServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-datasources/samples/test/quickstart.js b/packages/google-shopping-merchant-datasources/samples/test/quickstart.js deleted file mode 100644 index 1fc8bce42af0..000000000000 --- a/packages/google-shopping-merchant-datasources/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Commenting this out since we need a shopping account to test. -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {DataSourcesServiceClient} = require('@google-shopping/datasources').v1beta; -// const merchantapiClient = new DataSourcesServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-inventories/samples/test/quickstart.js b/packages/google-shopping-merchant-inventories/samples/test/quickstart.js deleted file mode 100644 index 2bfbc4b04d19..000000000000 --- a/packages/google-shopping-merchant-inventories/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -// const {RegionalInventoryServiceClient} = -// require('@google-shopping/inventories').v1beta; -// const merchantapiClient = new RegionalInventoryServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - // let projectId; - - before(async () => { - // projectId = await merchantapiClient.getProjectId(); - }); - - it('should run quickstart', async () => { - // Requires oauth to authenticate (cannot run as SA in test) - // const output = execSync( - // `node ./quickstart.js projects/${projectId}/locations/us-central1`, - // {cwd} - // ); - // assert(output !== null); - }); -}); diff --git a/packages/google-shopping-merchant-issueresolution/samples/test/quickstart.js b/packages/google-shopping-merchant-issueresolution/samples/test/quickstart.js deleted file mode 100644 index db99a2aacf07..000000000000 --- a/packages/google-shopping-merchant-issueresolution/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {IssueResolutionServiceClient} = -// require('@google-shopping/issueresolution').v1beta; -// const merchantapiClient = new IssueResolutionServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-lfp/samples/test/quickstart.js b/packages/google-shopping-merchant-lfp/samples/test/quickstart.js deleted file mode 100644 index c63bbf1c52b2..000000000000 --- a/packages/google-shopping-merchant-lfp/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Commenting out this test since we need a merchant account to run -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {LfpStoreServiceClient} = require('@google-shopping/lfp').v1beta; -// const merchantapiClient = new LfpStoreServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-notifications/samples/test/quickstart.js b/packages/google-shopping-merchant-notifications/samples/test/quickstart.js deleted file mode 100644 index 1b6ccecbf826..000000000000 --- a/packages/google-shopping-merchant-notifications/samples/test/quickstart.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Commenting this test out since we need a merchant account to run it -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {NotificationsApiServiceClient} = -// require('@google-shopping/notifications').v1beta; -// const merchantapiClient = new NotificationsApiServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-ordertracking/samples/test/quickstart.js b/packages/google-shopping-merchant-ordertracking/samples/test/quickstart.js deleted file mode 100644 index d4a0c826e394..000000000000 --- a/packages/google-shopping-merchant-ordertracking/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {OrderTrackingSignalsServiceClient} = -// require('@google-shopping/ordertracking').v1beta; -// const merchantapiClient = new OrderTrackingSignalsServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-products/samples/test/quickstart.js b/packages/google-shopping-merchant-products/samples/test/quickstart.js deleted file mode 100644 index 245e3672dfb4..000000000000 --- a/packages/google-shopping-merchant-products/samples/test/quickstart.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const {describe, before} = require('mocha'); -const {ProductsServiceClient} = require('@google-shopping/products').v1beta; -const merchantapiClient = new ProductsServiceClient(); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await merchantapiClient.getProjectId(); - }); -}); diff --git a/packages/google-shopping-merchant-promotions/samples/test/quickstart.js b/packages/google-shopping-merchant-promotions/samples/test/quickstart.js deleted file mode 100644 index 2f12b0f0a803..000000000000 --- a/packages/google-shopping-merchant-promotions/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Need a shopping account to run sample tests -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {PromotionsServiceClient} = require('@google-shopping/promotions').v1beta; -// const merchantapiClient = new PromotionsServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-quota/samples/test/quickstart.js b/packages/google-shopping-merchant-quota/samples/test/quickstart.js deleted file mode 100644 index d99d8ca31d63..000000000000 --- a/packages/google-shopping-merchant-quota/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Commenting out this test, since we need a merchant account to run it -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {QuotaServiceClient} = require('@google-shopping/quota').v1beta; -// const merchantapiClient = new QuotaServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-shopping-merchant-reports/samples/test/quickstart.js b/packages/google-shopping-merchant-reports/samples/test/quickstart.js deleted file mode 100644 index 30f94a11bdf7..000000000000 --- a/packages/google-shopping-merchant-reports/samples/test/quickstart.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -// const {ReportServiceClient} = require('@google-shopping/reports').v1beta; -// const merchantapiClient = new ReportServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - // let projectId; - - before(async () => { - // projectId = await merchantapiClient.getProjectId(); - }); - - it('should run quickstart', async () => { - // const output = execSync( - // `node ./quickstart.js projects/${projectId}/locations/us-central1`, - // {cwd} - // ); - // assert(output !== null); - }); -}); diff --git a/packages/google-shopping-merchant-reviews/samples/test/quickstart.js b/packages/google-shopping-merchant-reviews/samples/test/quickstart.js deleted file mode 100644 index 2c11021a2d3f..000000000000 --- a/packages/google-shopping-merchant-reviews/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// 'use strict'; - -// const assert = require('assert'); -// const path = require('path'); -// const cp = require('child_process'); -// const {describe, it, before} = require('mocha'); -// const {ProductReviewsServiceClient} = -// require('@google-shopping/reviews').v1beta; -// const merchantapiClient = new ProductReviewsServiceClient(); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); - -// describe('Quickstart', () => { -// let projectId; - -// before(async () => { -// projectId = await merchantapiClient.getProjectId(); -// }); - -// it('should run quickstart', async () => { -// const output = execSync( -// `node ./quickstart.js projects/${projectId}/locations/us-central1`, -// {cwd} -// ); -// assert(output !== null); -// }); -// }); diff --git a/packages/google-storage-control/samples/test/quickstart.js b/packages/google-storage-control/samples/test/quickstart.js deleted file mode 100644 index f08770c3436b..000000000000 --- a/packages/google-storage-control/samples/test/quickstart.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it} = require('mocha'); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - it('should run quickstart', async () => { - const bucketName = 'storage-control-test-monorepo'; - - const output = execSync(`node ./quickstart.js ${bucketName}`, {cwd}); - assert.match(output, new RegExp(`Bucket ${bucketName} has location type`)); - }); -}); diff --git a/packages/google-storagetransfer/samples/test/quickstart.js b/packages/google-storagetransfer/samples/test/quickstart.js deleted file mode 100644 index 98abdcdd3936..000000000000 --- a/packages/google-storagetransfer/samples/test/quickstart.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2026 Google LLC - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -const {assert} = require('chai'); -const {after, before, describe, it} = require('mocha'); - -const {BucketManager, TransferJobManager, runSample} = require('./utils'); - -describe('quickstart', () => { - const testBucketManager = new BucketManager(); - const testTransferJobManager = new TransferJobManager(); - - let projectId; - let sourceBucket; - let sinkBucket; - - before(async () => { - projectId = await testBucketManager.getProjectId(); - sourceBucket = (await testBucketManager.generateGCSBucket()).name; - sinkBucket = (await testBucketManager.generateGCSBucket()).name; - }); - - after(async () => { - await testBucketManager.deleteBuckets(); - await testTransferJobManager.cleanUp(); - }); - - it('should run quickstart', async () => { - const output = await runSample('quickstart', [ - projectId, - sourceBucket, - sinkBucket, - ]); - - assert.include(output, 'transferJobs/'); - - // If it ran successfully and a job was created, delete it to clean up - const [jobName] = output.match(/transferJobs.*/); - - testTransferJobManager.transferJobToCleanUp(jobName); - }); -}); diff --git a/packages/google-streetview-publish/samples/test/quickstart.js b/packages/google-streetview-publish/samples/test/quickstart.js deleted file mode 100644 index 8ff4b8d29699..000000000000 --- a/packages/google-streetview-publish/samples/test/quickstart.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {StreetViewPublishServiceClient} = - require('@googlemaps/streetview-publish').v1; -const publishClient = new StreetViewPublishServiceClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const cwd = path.join(__dirname, '..'); - -describe('Quickstart', () => { - let projectId; - - before(async () => { - projectId = await publishClient.getProjectId(); - }); - - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); diff --git a/packages/grafeas/samples/test/quickstart.js b/packages/grafeas/samples/test/quickstart.js deleted file mode 100644 index 602f0b67c477..000000000000 --- a/packages/grafeas/samples/test/quickstart.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -// const path = require('path'); -// const {assert} = require('chai'); -const {describe, it} = require('mocha'); -// const cp = require('child_process'); - -// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -// const cwd = path.join(__dirname, '..'); -// const projectId = process.env.GCLOUD_PROJECT; - -describe('Quickstart', () => { - it('should run quickstart', async () => { - // TODO: figure out how we are going to test a non-container-analysis - // API endpoint. - // const stdout = execSync(`node ./samples/quickstart.js ${projectId}`, {cwd}); - // assert.include(stdout, '[]'); - }); -});