@testomatio/reporter 1.6.11-beta1.s3-fix → 1.6.11

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/lib/uploader.js CHANGED
@@ -328,11 +328,6 @@ class S3Uploader {
328
328
  }
329
329
  }
330
330
 
331
- // Normalize the URL
332
- if (!s3Location.startsWith('http')) {
333
- s3Location = `https://${s3Location}`;
334
- }
335
-
336
331
  return s3Location;
337
332
  }
338
333
 
@@ -358,13 +353,10 @@ class S3Uploader {
358
353
  credentials: {
359
354
  accessKeyId: S3_ACCESS_KEY_ID,
360
355
  secretAccessKey: S3_SECRET_ACCESS_KEY,
356
+ s3ForcePathStyle: S3_FORCE_PATH_STYLE,
361
357
  },
362
358
  };
363
359
 
364
- if (S3_FORCE_PATH_STYLE) {
365
- cfg.forcePathStyle = !['false', '0'].includes(String(S3_FORCE_PATH_STYLE || '').toLowerCase());
366
- }
367
-
368
360
  if (S3_SESSION_TOKEN) {
369
361
  cfg.credentials.sessionToken = S3_SESSION_TOKEN;
370
362
  }
@@ -375,7 +367,6 @@ class S3Uploader {
375
367
 
376
368
  return cfg;
377
369
  }
378
-
379
370
  }
380
371
 
381
372
  module.exports = S3Uploader;
package/lib/xmlReader.js CHANGED
@@ -109,7 +109,7 @@ class XmlReader {
109
109
  }
110
110
 
111
111
  processJUnit(jsonSuite) {
112
- const { testsuite, name, tests, failures, errors, time } = jsonSuite;
112
+ const { testsuite, name, tests, failures, errors } = jsonSuite;
113
113
 
114
114
  reduceOptions.preferClassname = this.stats.language === 'python';
115
115
  const resultTests = processTestSuite(testsuite);
@@ -117,6 +117,8 @@ class XmlReader {
117
117
  const hasFailures = resultTests.filter(t => t.status === 'failed').length > 0;
118
118
  const status = failures > 0 || errors > 0 || hasFailures ? 'failed' : 'passed';
119
119
 
120
+ const time = testsuite.time || 0;
121
+ // debug('time', jsonSuite, time)
120
122
  if (time) {
121
123
  if (!this.stats.duration) this.stats.duration = 0;
122
124
  this.stats.duration += parseFloat(time);
@@ -419,19 +421,18 @@ class XmlReader {
419
421
  this.formatErrors();
420
422
  this.formatTests();
421
423
 
422
- debug('Uploading data', {
423
- ...this.stats,
424
- tests: this.tests,
425
- });
426
424
 
427
425
  const dataString = {
428
426
  ...this.stats,
429
427
  detach: this.requestParams.detach,
430
428
  api_key: this.requestParams.apiKey,
431
429
  status: 'finished',
430
+ duration: this.stats.duration,
432
431
  tests: this.tests,
433
432
  };
434
433
 
434
+ debug('Uploading data', dataString);
435
+
435
436
  return Promise.all(this.pipes.map(p => p.finishRun(dataString)));
436
437
  }
437
438
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.6.11-beta1.s3-fix",
3
+ "version": "1.6.11",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",