Skip to content

Commit ac38c95

Browse files
author
Joanna Grycz
committed
Changes after review
1 parent 8bd10c0 commit ac38c95

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

batch/create/create_batch_labels_runnable.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ async function main() {
3232
const projectId = await batchClient.getProjectId();
3333
// Name of the region you want to use to run the job. Regions that are
3434
// available for Batch are listed on: https://cloud.google.com/batch/docs/get-started#locations
35-
const region = 'europe-central2';
35+
const region = 'us-central1';
3636
// The name of the job that will be created.
3737
// It needs to be unique for each project and region pair.
38-
const jobName = 'batch-labels-runnable';
38+
const jobName = 'example-job';
3939
// Name of the label1 to be applied for your Job.
40-
const labelName1 = 'runnable_label_name_1';
40+
const labelName1 = 'RUNNABLE_LABEL_NAME1';
4141
// Value for the label1 to be applied for your Job.
42-
const labelValue1 = 'runnable_label_value1';
42+
const labelValue1 = 'RUNNABLE_LABEL_VALUE1';
4343
// Name of the label2 to be applied for your Job.
44-
const labelName2 = 'runnable_label_name_2';
44+
const labelName2 = 'RUNNABLE_LABEL_NAME2';
4545
// Value for the label2 to be applied for your Job.
46-
const labelValue2 = 'runnable_label_value2';
46+
const labelValue2 = 'RUNNABLE_LABEL_VALUE2';
4747

4848
const container = new batch.Runnable.Container({
4949
imageUri: 'gcr.io/google-containers/busybox',

batch/test/create_batch_labels_runnable.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@ const {deleteJob} = require('./batchClient_operations');
2727
const batchClient = new BatchServiceClient();
2828

2929
describe('Create batch labels runnable', async () => {
30-
const runnableName = 'batch-labels-runnable';
31-
const region = 'europe-central2';
30+
const jobName = 'example-job';
31+
const region = 'us-central1';
3232
let projectId;
3333

3434
before(async () => {
3535
projectId = await batchClient.getProjectId();
3636
});
3737

3838
after(async () => {
39-
await deleteJob(batchClient, projectId, region, runnableName);
39+
await deleteJob(batchClient, projectId, region, jobName);
4040
});
4141

4242
it('should create a new job with labels for runnables', async () => {
4343
const expectedRunnableLabels = [
4444
{
4545
executable: 'container',
4646
labels: {
47-
runnable_label_name_1: 'runnable_label_value1',
47+
RUNNABLE_LABEL_NAME1: 'RUNNABLE_LABEL_VALUE1',
4848
},
4949
},
5050
{
5151
executable: 'script',
5252
labels: {
53-
runnable_label_name_2: 'runnable_label_value2',
53+
RUNNABLE_LABEL_NAME2: 'RUNNABLE_LABEL_VALUE2',
5454
},
5555
},
5656
];

0 commit comments

Comments
 (0)