engine-dependency 1.0.4 → 1.0.6
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.
|
@@ -59,11 +59,11 @@ class TestInformationService extends services_base_service.default {
|
|
|
59
59
|
duration: testInfo.duration,
|
|
60
60
|
testFile: testInfo.file,
|
|
61
61
|
testProject: process.env.PROJECT_NAME,
|
|
62
|
-
retries: testInfo.retries
|
|
62
|
+
retries: testInfo.retries ?? 0,
|
|
63
63
|
retry: testInfo.retry ?? 0,
|
|
64
64
|
tags: testInfo.tags || [],
|
|
65
65
|
environment: process.env.ENV,
|
|
66
|
-
testInfo:
|
|
66
|
+
testInfo: null,
|
|
67
67
|
pipelineId: null,
|
|
68
68
|
commitSha: null,
|
|
69
69
|
branch: null,
|
|
@@ -98,10 +98,18 @@ class TestInformationService extends services_base_service.default {
|
|
|
98
98
|
|
|
99
99
|
async sendLocalTestResult(testInfo) {
|
|
100
100
|
try {
|
|
101
|
+
|
|
102
|
+
const token = await this.generateToken();
|
|
103
|
+
if (!token) {
|
|
104
|
+
console.log('No se pudo obtener el token, omitiendo envio de resultado de test');
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
101
108
|
const payload = this.buildLocalPayload(testInfo);
|
|
102
109
|
const response = await this.sendPOSTRequest(
|
|
103
110
|
`${this.baseUrl}${this.testResultsEndpoint}`,
|
|
104
|
-
payload
|
|
111
|
+
payload,
|
|
112
|
+
{ Authorization: `Bearer ${token}` }
|
|
105
113
|
);
|
|
106
114
|
|
|
107
115
|
console.log(`Resultado de test enviado: ${testInfo.title} - ${testInfo.status}`);
|
|
@@ -57,11 +57,11 @@ class TestInformationService extends BaseService {
|
|
|
57
57
|
duration: testInfo.duration,
|
|
58
58
|
testFile: testInfo.file,
|
|
59
59
|
testProject: process.env.PROJECT_NAME,
|
|
60
|
-
retries: testInfo.retries
|
|
60
|
+
retries: testInfo.retries ?? 0,
|
|
61
61
|
retry: testInfo.retry ?? 0,
|
|
62
62
|
tags: testInfo.tags || [],
|
|
63
63
|
environment: process.env.ENV,
|
|
64
|
-
testInfo:
|
|
64
|
+
testInfo: null,
|
|
65
65
|
pipelineId: null,
|
|
66
66
|
commitSha: null,
|
|
67
67
|
branch: null,
|
|
@@ -96,10 +96,18 @@ class TestInformationService extends BaseService {
|
|
|
96
96
|
|
|
97
97
|
async sendLocalTestResult(testInfo) {
|
|
98
98
|
try {
|
|
99
|
+
|
|
100
|
+
const token = await this.generateToken();
|
|
101
|
+
if (!token) {
|
|
102
|
+
console.log('No se pudo obtener el token, omitiendo envio de resultado de test');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
const payload = this.buildLocalPayload(testInfo);
|
|
100
107
|
const response = await this.sendPOSTRequest(
|
|
101
108
|
`${this.baseUrl}${this.testResultsEndpoint}`,
|
|
102
|
-
payload
|
|
109
|
+
payload,
|
|
110
|
+
{ Authorization: `Bearer ${token}` }
|
|
103
111
|
);
|
|
104
112
|
|
|
105
113
|
console.log(`Resultado de test enviado: ${testInfo.title} - ${testInfo.status}`);
|