Skip to content

Commit f8c407b

Browse files
author
ace-n
committed
Remove tests for non-migrated samples
1 parent 638f5bc commit f8c407b

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

scheduler/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
},
2121
"devDependencies": {
2222
"chai": "^4.2.0",
23-
"mocha": "^8.0.0",
24-
"supertest": "^6.0.0"
23+
"mocha": "^8.0.0"
2524
}
2625
}

scheduler/test/test.samples.js

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ const {CloudSchedulerClient} = require('@google-cloud/scheduler');
1818
const {assert} = require('chai');
1919
const {describe, it, before} = require('mocha');
2020
const cp = require('child_process');
21-
const supertest = require('supertest');
22-
const app = require('../app.js');
23-
const request = supertest(app);
2421

2522
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2623
const LOCATION_ID = process.env.LOCATION_ID || 'us-central1';
@@ -35,36 +32,12 @@ describe('Cloud Scheduler Sample Tests', () => {
3532
PROJECT_ID = await client.getProjectId();
3633
});
3734

38-
it('should create and delete a scheduler job', async () => {
35+
it('should create a scheduler job', async () => {
3936
const stdout = execSync(
4037
`node createJob.js ${PROJECT_ID} ${LOCATION_ID} ${SERVICE_ID}`
4138
);
4239
assert.match(stdout, /Created job/);
4340
jobName = stdout.split('/').pop();
4441
});
45-
46-
it('should update a scheduler job', async () => {
47-
const stdout = execSync(
48-
`node updateJob.js ${PROJECT_ID} ${LOCATION_ID} ${jobName}`
49-
);
50-
assert.match(stdout, /Updated job/);
51-
});
52-
53-
it('should delete a scheduler job', async () => {
54-
const stdout = execSync(
55-
`node deleteJob.js ${PROJECT_ID} ${LOCATION_ID} ${jobName}`
56-
);
57-
assert.match(stdout, /Job deleted/);
58-
});
5942
});
6043

61-
describe('Server should respond to /log_payload', () => {
62-
it('should log the payload', done => {
63-
const body = Buffer.from('test');
64-
request
65-
.post('/log_payload')
66-
.type('raw')
67-
.send(body)
68-
.expect(200, /Printed job/, done);
69-
});
70-
});

0 commit comments

Comments
 (0)