k2hr3-api 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ k2hr3-api (1.0.24) unstable; urgency=low
2
+
3
+ * Updated dependencies and test code for new chai version - #98
4
+
5
+ -- Takeshi Nakatani <ggtakec@gmail.com> Mon, 19 Jun 2023 21:09:01 +0900
6
+
1
7
  k2hr3-api (1.0.23) unstable; urgency=low
2
8
 
3
9
  * Re-fixed a bug about stopping processes in run.sh - #96
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k2hr3-api",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "dependencies": {
5
5
  "@kubernetes/client-node": "^0.18.1",
6
6
  "body-parser": "^1.20.2",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "chai": "^4.3.7",
32
- "chai-http": "^4.3.0",
33
- "eslint": "^8.41.0",
32
+ "chai-http": "^4.4.0",
33
+ "eslint": "^8.43.0",
34
34
  "mocha": "^10.2.0",
35
35
  "nyc": "^15.1.0"
36
36
  },
@@ -174,6 +174,7 @@ describe('API : EXTDATA', function(){ // eslint-disable-line no-undef
174
174
 
175
175
  chai.request(app)
176
176
  .get(uri)
177
+ .set('user-agent', '')
177
178
  .set('content-type', 'application/octet-stream')
178
179
  .set('user-agent', ua)
179
180
  .set('accept-encoding', 'identity') // Chai send gzip encoding as default, thus we set 'identity'
@@ -194,6 +195,7 @@ describe('API : EXTDATA', function(){ // eslint-disable-line no-undef
194
195
 
195
196
  chai.request(app)
196
197
  .get(uri)
198
+ .set('user-agent', '')
197
199
  .set('content-type', 'application/octet-stream')
198
200
  .set('accept-encoding', 'identity') // Chai send gzip encoding as default, thus we set 'identity'
199
201
  .end(function(err, res){
@@ -82,9 +82,9 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
82
82
  expect(res.files).to.be.an('object'); // response has some files from 'multipart/mixed'
83
83
  expect(res.files[null]).to.be.an('object'); // check only first(null) position( [TODO] checking another )
84
84
  expect(res.files[null].size).to.be.a('number'); // file has size member
85
- expect(res.files[null].path).to.be.an('string').to.not.empty; // file has temporary path
86
- expect(res.files[null].name).to.be.an('string').to.not.empty; // file has real name
87
- expect(res.files[null].type).to.be.an('string').to.not.empty; // file is set 'content-type'
85
+ expect(res.files[null].filepath).to.be.an('string').to.not.empty; // file has temporary path
86
+ expect(res.files[null].originalFilename).to.be.an('string').to.not.empty; // file has real name
87
+ expect(res.files[null].mimetype).to.be.an('string').to.not.empty; // file is set 'content-type'
88
88
  done();
89
89
  });
90
90
  });
@@ -109,9 +109,9 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
109
109
  expect(res.files).to.be.an('object'); // response has some files from 'multipart/mixed'
110
110
  expect(res.files[null]).to.be.an('object'); // check only first(null) position( [TODO] checking another )
111
111
  expect(res.files[null].size).to.be.a('number'); // file has size member
112
- expect(res.files[null].path).to.be.an('string').to.not.empty; // file has temporary path
113
- expect(res.files[null].name).to.be.an('string').to.not.empty; // file has real name
114
- expect(res.files[null].type).to.be.an('string').to.not.empty; // file is set 'content-type'
112
+ expect(res.files[null].filepath).to.be.an('string').to.not.empty; // file has temporary path
113
+ expect(res.files[null].originalFilename).to.be.an('string').to.not.empty; // file has real name
114
+ expect(res.files[null].mimetype).to.be.an('string').to.not.empty; // file is set 'content-type'
115
115
  done();
116
116
  });
117
117
  });
@@ -135,9 +135,9 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
135
135
  expect(res.files).to.be.an('object'); // response has some files from 'multipart/mixed'
136
136
  expect(res.files[null]).to.be.an('object'); // check only first(null) position( [TODO] checking another )
137
137
  expect(res.files[null].size).to.be.a('number'); // file has size member
138
- expect(res.files[null].path).to.be.an('string').to.not.empty; // file has temporary path
139
- expect(res.files[null].name).to.be.an('string').to.not.empty; // file has real name
140
- expect(res.files[null].type).to.be.an('string').to.not.empty; // file is set 'content-type'
138
+ expect(res.files[null].filepath).to.be.an('string').to.not.empty; // file has temporary path
139
+ expect(res.files[null].originalFilename).to.be.an('string').to.not.empty; // file has real name
140
+ expect(res.files[null].mimetype).to.be.an('string').to.not.empty; // file is set 'content-type'
141
141
  done();
142
142
  });
143
143
  });
@@ -148,6 +148,7 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
148
148
 
149
149
  chai.request(app)
150
150
  .get(uri)
151
+ .set('user-agent', '')
151
152
  .set('content-type', 'application/octet-stream')
152
153
  .set('accept-encoding', 'identity') // Chai send gzip encoding as default, thus we set 'identity'
153
154
  .end(function(err, res){
@@ -167,6 +168,7 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
167
168
 
168
169
  chai.request(app)
169
170
  .get(uri)
171
+ .set('user-agent', '')
170
172
  .set('accept-encoding', '') // Chai send gzip encoding as default, thus we set ''
171
173
  .end(function(err, res){
172
174
  expect(res).to.have.status(400);
@@ -191,7 +193,7 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
191
193
  .end(function(err, res){
192
194
  expect(res).to.have.status(200);
193
195
  expect(res).to.be.an('object');
194
- expect(res.body).to.be.an('object').to.be.empty; // body is empty because it must be 'application/json'
196
+ expect(res.body).be.instanceof(Buffer); // body is empty because it must be 'application/json'
195
197
  expect(res.text).to.be.a('undefined'); // text is empty because it must be 'text/plain'
196
198
  expect(res.files).to.be.a('undefined'); // files is empty because it must be 'text/plain'
197
199
  expect(res.header).to.be.an('object'); // check response header
@@ -219,7 +221,7 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
219
221
  .end(function(err, res){
220
222
  expect(res).to.have.status(200);
221
223
  expect(res).to.be.an('object');
222
- expect(res.body).to.be.an('object').to.be.empty; // body is empty because it must be 'application/json'
224
+ expect(res.body).be.instanceof(Buffer); // body is empty because it must be 'application/json'
223
225
  expect(res.text).to.be.a('undefined'); // text is empty because it must be 'text/plain'
224
226
  expect(res.files).to.be.a('undefined'); // files is empty because it must be 'text/plain'
225
227
  expect(res.header).to.be.an('object'); // check response header
@@ -246,7 +248,7 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
246
248
  .end(function(err, res){
247
249
  expect(res).to.have.status(200);
248
250
  expect(res).to.be.an('object');
249
- expect(res.body).to.be.an('object').to.be.empty; // body is empty because it must be 'application/json'
251
+ expect(res.body).be.instanceof(Buffer); // body is empty because it must be 'application/json'
250
252
  expect(res.text).to.be.a('undefined'); // text is empty because it must be 'text/plain'
251
253
  expect(res.files).to.be.a('undefined'); // files is empty because it must be 'text/plain'
252
254
  expect(res.header).to.be.an('object'); // check response header
@@ -265,6 +267,7 @@ describe('API : USERDATA', function(){ // eslint-disable-line no-undef
265
267
 
266
268
  chai.request(app)
267
269
  .get(uri)
270
+ .set('user-agent', '')
268
271
  .set('content-type', 'application/octet-stream')
269
272
  .set('accept-encoding', 'gzip')
270
273
  .end(function(err, res){