From f62b1bb6d66456c4f4a3d6f39b1bf8c1b7f5c5e7 Mon Sep 17 00:00:00 2001 From: George Cheng Date: Mon, 4 Mar 2019 17:38:37 +0800 Subject: [PATCH] REST server: remove expires in JWT payload of unit test (#2263) --- src/rest-server/test/jobExecutionType.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rest-server/test/jobExecutionType.js b/src/rest-server/test/jobExecutionType.js index 5fa715ab07..ffb90b4390 100644 --- a/src/rest-server/test/jobExecutionType.js +++ b/src/rest-server/test/jobExecutionType.js @@ -107,7 +107,7 @@ describe('Job execution type API /api/v1/user/:username/jobs/:jobName/executionT it('should stop job successfully', (done) => { chai.request(server) .put('/api/v1/user/iamadmin/jobs/test1/executionType') - .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OSwiZXhwIjoxNTUxNjgzODk5fQ.GniwMY_1L5n3crjV3u6G54KmaUv_OW5dHLwHlIt6IxE') + .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OX0.Dwopr33c_OV6glaN3vbM1Ja_Ox70xABigHzHnEsNsYw') .send({ 'value': 'STOP', }) @@ -122,7 +122,7 @@ describe('Job execution type API /api/v1/user/:username/jobs/:jobName/executionT it('admin should stop other user\'s job successfully', (done) => { chai.request(server) .put('/api/v1/user/test2/jobs/test2/executionType') - .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OSwiZXhwIjoxNTUxNjgzODk5fQ.GniwMY_1L5n3crjV3u6G54KmaUv_OW5dHLwHlIt6IxE') + .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OX0.Dwopr33c_OV6glaN3vbM1Ja_Ox70xABigHzHnEsNsYw') .send({ 'value': 'STOP', }) @@ -151,7 +151,7 @@ describe('Job execution type API /api/v1/user/:username/jobs/:jobName/executionT it('#909: should check request payload', (done) => { chai.request(server) .put('/api/v1/user/iamadmin/jobs/test1/executionType') - .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OSwiZXhwIjoxNTUxNjgzODk5fQ.GniwMY_1L5n3crjV3u6G54KmaUv_OW5dHLwHlIt6IxE') + .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OX0.Dwopr33c_OV6glaN3vbM1Ja_Ox70xABigHzHnEsNsYw') .set('Content-Type', 'text/unknown') .send('value=STOP') .end((err, res) => { @@ -231,7 +231,7 @@ describe('Job execution type API /api/v1/jobs/:jobName/executionType', () => { it('can stop job without namespace', (done) => { chai.request(server) .put('/api/v1/jobs/test1/executionType') - .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OSwiZXhwIjoxNTUxNjgzODk5fQ.GniwMY_1L5n3crjV3u6G54KmaUv_OW5dHLwHlIt6IxE') + .set('Authorization', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlhbWFkbWluIiwiYWRtaW4iOnRydWUsImlhdCI6MTUyMDU3OTg5OX0.Dwopr33c_OV6glaN3vbM1Ja_Ox70xABigHzHnEsNsYw') .send({ 'value': 'STOP', })