Skip to content

Commit 097ef1e

Browse files
author
Joanna Grycz
committed
Delete batchClient_operations
1 parent f23f812 commit 097ef1e

14 files changed

+39
-57
lines changed

batch/test/batchClient_operations.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

batch/test/create_batch_custom_events.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cwd = path.join(__dirname, '..');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const cp = require('child_process');
2726
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
@@ -37,7 +36,9 @@ describe('Create batch custom events job', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with custom events', () => {

batch/test/create_batch_custom_network.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch custom network', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with custom network', async () => {

batch/test/create_batch_labels_allocation.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch labels allocation', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with allocation policy labels', async () => {

batch/test/create_batch_labels_job.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch labels for job', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with labels', async () => {

batch/test/create_batch_labels_runnable.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('assert');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch labels runnable', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with labels for runnables', async () => {

batch/test/create_batch_notifications.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -38,7 +37,9 @@ describe('Create batch notifications', async () => {
3837
});
3938

4039
after(async () => {
41-
await deleteJob(batchClient, projectId, region, jobName);
40+
await batchClient.deleteJob({
41+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
42+
});
4243
});
4344

4445
it('should create a new job with batch notifications', async () => {

batch/test/create_batch_using_service_account.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
2424
const {ProjectsClient} = require('@google-cloud/resource-manager').v3;
25-
const {deleteJob} = require('./batchClient_operations');
2625

2726
const cwd = path.join(__dirname, '..');
2827
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
@@ -51,7 +50,9 @@ describe('Create batch job using service account', async () => {
5150
});
5251

5352
afterEach(async () => {
54-
await deleteJob(batchClient, projectId, region, jobName);
53+
await batchClient.deleteJob({
54+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
55+
});
5556
});
5657

5758
it('should create a new job using serviceAccount', async () => {

batch/test/create_gpu_job.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch GPU job', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with GPU', async () => {

batch/test/create_gpu_job_n1.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch GPU job on N1', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with GPU on N1', async () => {

batch/test/create_local_ssd_job.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch local ssd job', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with local ssd', async () => {

batch/test/create_nfs_job.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch NFS job', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with NFS', async () => {

batch/test/create_persistent_disk_job.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch job with persistent disk', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job with persistent disk', async () => {

batch/test/create_using_secret_manager.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const assert = require('node:assert/strict');
2121
const {describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {BatchServiceClient} = require('@google-cloud/batch').v1;
24-
const {deleteJob} = require('./batchClient_operations');
2524

2625
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2726
const cwd = path.join(__dirname, '..');
@@ -37,7 +36,9 @@ describe('Create batch using secret manager', async () => {
3736
});
3837

3938
after(async () => {
40-
await deleteJob(batchClient, projectId, region, jobName);
39+
await batchClient.deleteJob({
40+
name: `projects/${projectId}/locations/${region}/jobs/${jobName}`,
41+
});
4142
});
4243

4344
it('should create a new job using secret manager', async () => {

0 commit comments

Comments
 (0)