engine-dependency 1.0.4 → 1.0.5

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.
@@ -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}`);
@@ -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}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engine-dependency",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Dependencia centralizada para envio de datos via API al servicio Data Engine",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.cjs",