@testomatio/reporter 2.0.0-beta.1-gaxios → 2.0.0-beta.2-gaxios
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/pipe/testomatio.js +4 -4
- package/package.json +1 -1
- package/src/pipe/testomatio.js +3 -2
package/lib/pipe/testomatio.js
CHANGED
|
@@ -57,6 +57,7 @@ class TestomatioPipe {
|
|
|
57
57
|
timeout: constants_js_1.AXIOS_TIMEOUT,
|
|
58
58
|
proxy: proxy ? proxy.toString() : undefined,
|
|
59
59
|
retry: true,
|
|
60
|
+
agent: new (require('https').Agent)({ rejectUnauthorized: false, keepAlive: false }),
|
|
60
61
|
retryConfig: {
|
|
61
62
|
retry: constants_js_1.REPORTER_REQUEST_RETRIES.retriesPerRequest,
|
|
62
63
|
retryDelay: constants_js_1.REPORTER_REQUEST_RETRIES.retryTimeout,
|
|
@@ -185,7 +186,6 @@ class TestomatioPipe {
|
|
|
185
186
|
maxContentLength: Infinity,
|
|
186
187
|
responseType: 'json'
|
|
187
188
|
});
|
|
188
|
-
debug('Run created!', resp);
|
|
189
189
|
this.runId = resp.data.uid;
|
|
190
190
|
this.runUrl = `${this.url}/${resp.data.url.split('/').splice(3).join('/')}`;
|
|
191
191
|
this.runPublicUrl = resp.data.public_url;
|
|
@@ -200,7 +200,7 @@ class TestomatioPipe {
|
|
|
200
200
|
}
|
|
201
201
|
catch (err) {
|
|
202
202
|
const errorText = err.response?.data?.message || err.message;
|
|
203
|
-
debug('Error creating run',
|
|
203
|
+
debug('Error creating run', err);
|
|
204
204
|
console.log(errorText || err);
|
|
205
205
|
if (!this.apiKey)
|
|
206
206
|
console.error('Testomat.io API key is not set');
|
|
@@ -439,9 +439,9 @@ function printCreateIssue(err) {
|
|
|
439
439
|
if (!err.config)
|
|
440
440
|
return;
|
|
441
441
|
const time = new Date().toUTCString();
|
|
442
|
-
const {
|
|
442
|
+
const { body, url, baseURL, method } = err?.config || {};
|
|
443
443
|
console.log('```js');
|
|
444
|
-
console.log({
|
|
444
|
+
console.log({ body: body?.replace(/"(tstmt_[^"]+)"/g, 'tstmt_*'), url, baseURL, method, time });
|
|
445
445
|
console.log('```');
|
|
446
446
|
});
|
|
447
447
|
}
|
package/package.json
CHANGED
package/src/pipe/testomatio.js
CHANGED
|
@@ -58,6 +58,7 @@ class TestomatioPipe {
|
|
|
58
58
|
timeout: AXIOS_TIMEOUT,
|
|
59
59
|
proxy: proxy ? proxy.toString() : undefined,
|
|
60
60
|
retry: true,
|
|
61
|
+
agent: new (require('https').Agent)({ rejectUnauthorized: false, keepAlive: false }),
|
|
61
62
|
retryConfig: {
|
|
62
63
|
retry: REPORTER_REQUEST_RETRIES.retriesPerRequest,
|
|
63
64
|
retryDelay: REPORTER_REQUEST_RETRIES.retryTimeout,
|
|
@@ -486,9 +487,9 @@ function printCreateIssue(err) {
|
|
|
486
487
|
if (!err.config) return;
|
|
487
488
|
|
|
488
489
|
const time = new Date().toUTCString();
|
|
489
|
-
const {
|
|
490
|
+
const { body, url, baseURL, method } = err?.config || {};
|
|
490
491
|
console.log('```js');
|
|
491
|
-
console.log({
|
|
492
|
+
console.log({ body: body?.replace(/"(tstmt_[^"]+)"/g, 'tstmt_*'), url, baseURL, method, time });
|
|
492
493
|
console.log('```');
|
|
493
494
|
});
|
|
494
495
|
}
|