@sasjs/cli 3.6.0 → 3.6.1
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.
|
@@ -92,6 +92,14 @@ var expectedDataObj = {
|
|
|
92
92
|
}
|
|
93
93
|
]
|
|
94
94
|
};
|
|
95
|
+
var getOutputJson = function () { return __awaiter(void 0, void 0, void 0, function () { var _a, _b; return __generator(this, function (_c) {
|
|
96
|
+
switch (_c.label) {
|
|
97
|
+
case 0:
|
|
98
|
+
_b = (_a = JSON).parse;
|
|
99
|
+
return [4 /*yield*/, utils_1.readFile(path_1.default.join(process.projectDir, 'output.json'))];
|
|
100
|
+
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];
|
|
101
|
+
}
|
|
102
|
+
}); }); };
|
|
95
103
|
describe('sasjs request without compute API', function () {
|
|
96
104
|
var appName = 'cli-tests-request-' + utils_2.generateTimestamp();
|
|
97
105
|
var target = test_1.generateTestTarget(appName, "/Public/app/cli-tests/" + appName, {
|
|
@@ -157,69 +165,77 @@ describe('sasjs request without compute API', function () {
|
|
|
157
165
|
});
|
|
158
166
|
}); });
|
|
159
167
|
it("should execute service 'sendArr' with absolute path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
160
|
-
var
|
|
161
|
-
return __generator(this, function (
|
|
162
|
-
switch (
|
|
168
|
+
var _a, _b;
|
|
169
|
+
return __generator(this, function (_c) {
|
|
170
|
+
switch (_c.label) {
|
|
163
171
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendArr", dataPathRel, undefined, authConfig)).toResolve()];
|
|
164
172
|
case 1:
|
|
165
|
-
|
|
166
|
-
|
|
173
|
+
_c.sent();
|
|
174
|
+
_a = expect;
|
|
175
|
+
return [4 /*yield*/, getOutputJson()];
|
|
167
176
|
case 2:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataArr.table1);
|
|
178
|
+
_b = expect;
|
|
179
|
+
return [4 /*yield*/, getOutputJson()];
|
|
180
|
+
case 3:
|
|
181
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataArr.table2);
|
|
172
182
|
return [2 /*return*/];
|
|
173
183
|
}
|
|
174
184
|
});
|
|
175
185
|
}); });
|
|
176
186
|
it("should execute service 'sendObj' with absolute path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
177
|
-
var
|
|
178
|
-
return __generator(this, function (
|
|
179
|
-
switch (
|
|
187
|
+
var _a, _b;
|
|
188
|
+
return __generator(this, function (_c) {
|
|
189
|
+
switch (_c.label) {
|
|
180
190
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendObj", dataPathRel, undefined, authConfig)).toResolve()];
|
|
181
191
|
case 1:
|
|
182
|
-
|
|
183
|
-
|
|
192
|
+
_c.sent();
|
|
193
|
+
_a = expect;
|
|
194
|
+
return [4 /*yield*/, getOutputJson()];
|
|
184
195
|
case 2:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
196
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataObj.table1);
|
|
197
|
+
_b = expect;
|
|
198
|
+
return [4 /*yield*/, getOutputJson()];
|
|
199
|
+
case 3:
|
|
200
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataObj.table2);
|
|
189
201
|
return [2 /*return*/];
|
|
190
202
|
}
|
|
191
203
|
});
|
|
192
204
|
}); });
|
|
193
205
|
it("should execute service 'sendArr' with relative path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
194
|
-
var
|
|
195
|
-
return __generator(this, function (
|
|
196
|
-
switch (
|
|
206
|
+
var _a, _b;
|
|
207
|
+
return __generator(this, function (_c) {
|
|
208
|
+
switch (_c.label) {
|
|
197
209
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, 'services/runRequest/sendArr', dataPathRel, undefined, authConfig)).toResolve()];
|
|
198
210
|
case 1:
|
|
199
|
-
|
|
200
|
-
|
|
211
|
+
_c.sent();
|
|
212
|
+
_a = expect;
|
|
213
|
+
return [4 /*yield*/, getOutputJson()];
|
|
201
214
|
case 2:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
215
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataArr.table1);
|
|
216
|
+
_b = expect;
|
|
217
|
+
return [4 /*yield*/, getOutputJson()];
|
|
218
|
+
case 3:
|
|
219
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataArr.table2);
|
|
206
220
|
return [2 /*return*/];
|
|
207
221
|
}
|
|
208
222
|
});
|
|
209
223
|
}); });
|
|
210
224
|
it("should execute service 'sendObj' with relative path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
211
|
-
var
|
|
212
|
-
return __generator(this, function (
|
|
213
|
-
switch (
|
|
225
|
+
var _a, _b;
|
|
226
|
+
return __generator(this, function (_c) {
|
|
227
|
+
switch (_c.label) {
|
|
214
228
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, 'services/runRequest/sendObj', dataPathRel, undefined, authConfig)).toResolve()];
|
|
215
229
|
case 1:
|
|
216
|
-
|
|
217
|
-
|
|
230
|
+
_c.sent();
|
|
231
|
+
_a = expect;
|
|
232
|
+
return [4 /*yield*/, getOutputJson()];
|
|
218
233
|
case 2:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
234
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataObj.table1);
|
|
235
|
+
_b = expect;
|
|
236
|
+
return [4 /*yield*/, getOutputJson()];
|
|
237
|
+
case 3:
|
|
238
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataObj.table2);
|
|
223
239
|
return [2 /*return*/];
|
|
224
240
|
}
|
|
225
241
|
});
|
|
@@ -231,7 +247,7 @@ describe('sasjs request without compute API', function () {
|
|
|
231
247
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendArr", dataPathRel, undefined, authConfig, undefined, undefined, './myoutput.json')).toResolve()];
|
|
232
248
|
case 1:
|
|
233
249
|
_a.sent();
|
|
234
|
-
return [4 /*yield*/, utils_1.readFile(process.projectDir
|
|
250
|
+
return [4 /*yield*/, utils_1.readFile(path_1.default.join(process.projectDir, 'myoutput.json'))];
|
|
235
251
|
case 2:
|
|
236
252
|
rawData = _a.sent();
|
|
237
253
|
output = JSON.parse(rawData);
|
|
@@ -246,13 +262,13 @@ describe('sasjs request without compute API', function () {
|
|
|
246
262
|
return __generator(this, function (_a) {
|
|
247
263
|
switch (_a.label) {
|
|
248
264
|
case 0:
|
|
249
|
-
jobPath = utils_3.prefixAppLoc(target.appLoc,
|
|
265
|
+
jobPath = utils_3.prefixAppLoc(target.appLoc, 'services/runRequest/err');
|
|
250
266
|
log = getLogFilePath_1.getLogFilePath('./mylog.txt', jobPath || '');
|
|
251
|
-
return [4 /*yield*/, expect(request_1.runSasJob(target, false,
|
|
267
|
+
return [4 /*yield*/, expect(request_1.runSasJob(target, false, jobPath, dataPathRel, undefined, authConfig, log, jobPath)).toResolve()];
|
|
252
268
|
case 1:
|
|
253
269
|
_a.sent();
|
|
254
|
-
rawLogDataStats = fs_1.statSync(
|
|
255
|
-
rawDataStats = fs_1.statSync(process.projectDir
|
|
270
|
+
rawLogDataStats = fs_1.statSync(log);
|
|
271
|
+
rawDataStats = fs_1.statSync(path_1.default.join(process.projectDir, 'output.json'));
|
|
256
272
|
expect(rawLogDataStats.size).toBeGreaterThan(10);
|
|
257
273
|
expect(rawDataStats.size).toBeGreaterThan(10);
|
|
258
274
|
return [2 /*return*/];
|
|
@@ -264,13 +280,13 @@ describe('sasjs request without compute API', function () {
|
|
|
264
280
|
return __generator(this, function (_a) {
|
|
265
281
|
switch (_a.label) {
|
|
266
282
|
case 0:
|
|
267
|
-
jobPath = utils_3.prefixAppLoc(target.appLoc,
|
|
283
|
+
jobPath = utils_3.prefixAppLoc(target.appLoc, 'services/runRequest/err');
|
|
268
284
|
log = getLogFilePath_1.getLogFilePath('', jobPath || '');
|
|
269
|
-
return [4 /*yield*/, expect(request_1.runSasJob(target, false,
|
|
285
|
+
return [4 /*yield*/, expect(request_1.runSasJob(target, false, jobPath, dataPathRel, undefined, authConfig, log, jobPath)).toResolve()];
|
|
270
286
|
case 1:
|
|
271
287
|
_a.sent();
|
|
272
|
-
rawLogDataStats = fs_1.statSync(
|
|
273
|
-
rawDataStats = fs_1.statSync(process.projectDir
|
|
288
|
+
rawLogDataStats = fs_1.statSync(log);
|
|
289
|
+
rawDataStats = fs_1.statSync(path_1.default.join(process.projectDir, 'output.json'));
|
|
274
290
|
expect(rawLogDataStats.size).toBeGreaterThan(10);
|
|
275
291
|
expect(rawDataStats.size).toBeGreaterThan(10);
|
|
276
292
|
return [2 /*return*/];
|
|
@@ -339,69 +355,77 @@ describe('sasjs request with SAS9', function () {
|
|
|
339
355
|
});
|
|
340
356
|
}); });
|
|
341
357
|
it("should execute service 'sendArr' with absolute path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
342
|
-
var
|
|
343
|
-
return __generator(this, function (
|
|
344
|
-
switch (
|
|
358
|
+
var _a, _b;
|
|
359
|
+
return __generator(this, function (_c) {
|
|
360
|
+
switch (_c.label) {
|
|
345
361
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendArr", dataPathRel)).toResolve()];
|
|
346
362
|
case 1:
|
|
347
|
-
|
|
348
|
-
|
|
363
|
+
_c.sent();
|
|
364
|
+
_a = expect;
|
|
365
|
+
return [4 /*yield*/, getOutputJson()];
|
|
349
366
|
case 2:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
367
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataArr.table1);
|
|
368
|
+
_b = expect;
|
|
369
|
+
return [4 /*yield*/, getOutputJson()];
|
|
370
|
+
case 3:
|
|
371
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataArr.table2);
|
|
354
372
|
return [2 /*return*/];
|
|
355
373
|
}
|
|
356
374
|
});
|
|
357
375
|
}); });
|
|
358
376
|
it("should execute service 'sendObj' with absolute path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
359
|
-
var
|
|
360
|
-
return __generator(this, function (
|
|
361
|
-
switch (
|
|
377
|
+
var _a, _b;
|
|
378
|
+
return __generator(this, function (_c) {
|
|
379
|
+
switch (_c.label) {
|
|
362
380
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendObj", dataPathRel)).toResolve()];
|
|
363
381
|
case 1:
|
|
364
|
-
|
|
365
|
-
|
|
382
|
+
_c.sent();
|
|
383
|
+
_a = expect;
|
|
384
|
+
return [4 /*yield*/, getOutputJson()];
|
|
366
385
|
case 2:
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
386
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataObj.table1);
|
|
387
|
+
_b = expect;
|
|
388
|
+
return [4 /*yield*/, getOutputJson()];
|
|
389
|
+
case 3:
|
|
390
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataObj.table2);
|
|
371
391
|
return [2 /*return*/];
|
|
372
392
|
}
|
|
373
393
|
});
|
|
374
394
|
}); });
|
|
375
395
|
it("should execute service 'sendArr' with relative path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
376
|
-
var
|
|
377
|
-
return __generator(this, function (
|
|
378
|
-
switch (
|
|
396
|
+
var _a, _b;
|
|
397
|
+
return __generator(this, function (_c) {
|
|
398
|
+
switch (_c.label) {
|
|
379
399
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, 'services/runRequest/sendArr', dataPathRel)).toResolve()];
|
|
380
400
|
case 1:
|
|
381
|
-
|
|
382
|
-
|
|
401
|
+
_c.sent();
|
|
402
|
+
_a = expect;
|
|
403
|
+
return [4 /*yield*/, getOutputJson()];
|
|
383
404
|
case 2:
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
405
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataArr.table1);
|
|
406
|
+
_b = expect;
|
|
407
|
+
return [4 /*yield*/, getOutputJson()];
|
|
408
|
+
case 3:
|
|
409
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataArr.table2);
|
|
388
410
|
return [2 /*return*/];
|
|
389
411
|
}
|
|
390
412
|
});
|
|
391
413
|
}); });
|
|
392
414
|
it("should execute service 'sendObj' with relative path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
393
|
-
var
|
|
394
|
-
return __generator(this, function (
|
|
395
|
-
switch (
|
|
415
|
+
var _a, _b;
|
|
416
|
+
return __generator(this, function (_c) {
|
|
417
|
+
switch (_c.label) {
|
|
396
418
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, 'services/runRequest/sendObj', dataPathRel)).toResolve()];
|
|
397
419
|
case 1:
|
|
398
|
-
|
|
399
|
-
|
|
420
|
+
_c.sent();
|
|
421
|
+
_a = expect;
|
|
422
|
+
return [4 /*yield*/, getOutputJson()];
|
|
400
423
|
case 2:
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
424
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataObj.table1);
|
|
425
|
+
_b = expect;
|
|
426
|
+
return [4 /*yield*/, getOutputJson()];
|
|
427
|
+
case 3:
|
|
428
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataObj.table2);
|
|
405
429
|
return [2 /*return*/];
|
|
406
430
|
}
|
|
407
431
|
});
|
|
@@ -413,7 +437,7 @@ describe('sasjs request with SAS9', function () {
|
|
|
413
437
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendArr", dataPathRel, undefined, undefined, undefined, undefined, './myoutput.json')).toResolve()];
|
|
414
438
|
case 1:
|
|
415
439
|
_a.sent();
|
|
416
|
-
return [4 /*yield*/, utils_1.readFile(process.projectDir
|
|
440
|
+
return [4 /*yield*/, utils_1.readFile(path_1.default.join(process.projectDir, 'myoutput.json'))];
|
|
417
441
|
case 2:
|
|
418
442
|
rawData = _a.sent();
|
|
419
443
|
output = JSON.parse(rawData);
|
|
@@ -428,13 +452,13 @@ describe('sasjs request with SAS9', function () {
|
|
|
428
452
|
return __generator(this, function (_a) {
|
|
429
453
|
switch (_a.label) {
|
|
430
454
|
case 0:
|
|
431
|
-
jobPath = utils_3.prefixAppLoc(target.appLoc,
|
|
455
|
+
jobPath = utils_3.prefixAppLoc(target.appLoc, 'services/runRequest/err');
|
|
432
456
|
log = getLogFilePath_1.getLogFilePath('./mylog.txt', jobPath || '');
|
|
433
|
-
return [4 /*yield*/, expect(request_1.runSasJob(target, false,
|
|
457
|
+
return [4 /*yield*/, expect(request_1.runSasJob(target, false, jobPath, dataPathRel, undefined, undefined, log, jobPath)).toResolve()];
|
|
434
458
|
case 1:
|
|
435
459
|
_a.sent();
|
|
436
|
-
rawLogDataStats = fs_1.statSync(
|
|
437
|
-
rawDataStats = fs_1.statSync(process.projectDir
|
|
460
|
+
rawLogDataStats = fs_1.statSync(log);
|
|
461
|
+
rawDataStats = fs_1.statSync(path_1.default.join(process.projectDir, 'output.json'));
|
|
438
462
|
expect(rawLogDataStats.size).toBeGreaterThan(10);
|
|
439
463
|
expect(rawDataStats.size).toBeGreaterThan(10);
|
|
440
464
|
return [2 /*return*/];
|
|
@@ -446,13 +470,13 @@ describe('sasjs request with SAS9', function () {
|
|
|
446
470
|
return __generator(this, function (_a) {
|
|
447
471
|
switch (_a.label) {
|
|
448
472
|
case 0:
|
|
449
|
-
jobPath = utils_3.prefixAppLoc(target.appLoc,
|
|
473
|
+
jobPath = utils_3.prefixAppLoc(target.appLoc, 'services/runRequest/err');
|
|
450
474
|
log = getLogFilePath_1.getLogFilePath('', jobPath || '');
|
|
451
|
-
return [4 /*yield*/, expect(request_1.runSasJob(target, false,
|
|
475
|
+
return [4 /*yield*/, expect(request_1.runSasJob(target, false, jobPath, dataPathRel, undefined, undefined, log, jobPath)).toResolve()];
|
|
452
476
|
case 1:
|
|
453
477
|
_a.sent();
|
|
454
|
-
rawLogDataStats = fs_1.statSync(
|
|
455
|
-
rawDataStats = fs_1.statSync(process.projectDir
|
|
478
|
+
rawLogDataStats = fs_1.statSync(log);
|
|
479
|
+
rawDataStats = fs_1.statSync(path_1.default.join(process.projectDir, 'output.json'));
|
|
456
480
|
expect(rawLogDataStats.size).toBeGreaterThan(10);
|
|
457
481
|
expect(rawDataStats.size).toBeGreaterThan(10);
|
|
458
482
|
return [2 /*return*/];
|
|
@@ -520,69 +544,77 @@ describe("sasjs request with compute API", function () {
|
|
|
520
544
|
});
|
|
521
545
|
}); });
|
|
522
546
|
it("should execute service 'sendArr' with absolute path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
523
|
-
var
|
|
524
|
-
return __generator(this, function (
|
|
525
|
-
switch (
|
|
547
|
+
var _a, _b;
|
|
548
|
+
return __generator(this, function (_c) {
|
|
549
|
+
switch (_c.label) {
|
|
526
550
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendArr", dataPathRel, configPathRel, authConfig)).toResolve()];
|
|
527
551
|
case 1:
|
|
528
|
-
|
|
529
|
-
|
|
552
|
+
_c.sent();
|
|
553
|
+
_a = expect;
|
|
554
|
+
return [4 /*yield*/, getOutputJson()];
|
|
530
555
|
case 2:
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
556
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataArr.table1);
|
|
557
|
+
_b = expect;
|
|
558
|
+
return [4 /*yield*/, getOutputJson()];
|
|
559
|
+
case 3:
|
|
560
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataArr.table2);
|
|
535
561
|
return [2 /*return*/];
|
|
536
562
|
}
|
|
537
563
|
});
|
|
538
564
|
}); });
|
|
539
565
|
it("should execute service 'sendObj' with absolute path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
540
|
-
var
|
|
541
|
-
return __generator(this, function (
|
|
542
|
-
switch (
|
|
566
|
+
var _a, _b;
|
|
567
|
+
return __generator(this, function (_c) {
|
|
568
|
+
switch (_c.label) {
|
|
543
569
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, "/Public/app/cli-tests/" + target.name + "/services/runRequest/sendObj", dataPathRel, configPathRel, authConfig)).toResolve()];
|
|
544
570
|
case 1:
|
|
545
|
-
|
|
546
|
-
|
|
571
|
+
_c.sent();
|
|
572
|
+
_a = expect;
|
|
573
|
+
return [4 /*yield*/, getOutputJson()];
|
|
547
574
|
case 2:
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
575
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataObj.table1);
|
|
576
|
+
_b = expect;
|
|
577
|
+
return [4 /*yield*/, getOutputJson()];
|
|
578
|
+
case 3:
|
|
579
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataObj.table2);
|
|
552
580
|
return [2 /*return*/];
|
|
553
581
|
}
|
|
554
582
|
});
|
|
555
583
|
}); });
|
|
556
584
|
it("should execute service 'sendArr' with relative path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
557
|
-
var
|
|
558
|
-
return __generator(this, function (
|
|
559
|
-
switch (
|
|
585
|
+
var _a, _b;
|
|
586
|
+
return __generator(this, function (_c) {
|
|
587
|
+
switch (_c.label) {
|
|
560
588
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, 'services/runRequest/sendArr', dataPathRel, undefined, authConfig)).toResolve()];
|
|
561
589
|
case 1:
|
|
562
|
-
|
|
563
|
-
|
|
590
|
+
_c.sent();
|
|
591
|
+
_a = expect;
|
|
592
|
+
return [4 /*yield*/, getOutputJson()];
|
|
564
593
|
case 2:
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
594
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataArr.table1);
|
|
595
|
+
_b = expect;
|
|
596
|
+
return [4 /*yield*/, getOutputJson()];
|
|
597
|
+
case 3:
|
|
598
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataArr.table2);
|
|
569
599
|
return [2 /*return*/];
|
|
570
600
|
}
|
|
571
601
|
});
|
|
572
602
|
}); });
|
|
573
603
|
it("should execute service 'sendObj' with relative path", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
574
|
-
var
|
|
575
|
-
return __generator(this, function (
|
|
576
|
-
switch (
|
|
604
|
+
var _a, _b;
|
|
605
|
+
return __generator(this, function (_c) {
|
|
606
|
+
switch (_c.label) {
|
|
577
607
|
case 0: return [4 /*yield*/, expect(request_1.runSasJob(target, false, 'services/runRequest/sendObj', dataPathRel, undefined, authConfig)).toResolve()];
|
|
578
608
|
case 1:
|
|
579
|
-
|
|
580
|
-
|
|
609
|
+
_c.sent();
|
|
610
|
+
_a = expect;
|
|
611
|
+
return [4 /*yield*/, getOutputJson()];
|
|
581
612
|
case 2:
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
613
|
+
_a.apply(void 0, [(_c.sent()).table1]).toEqual(expectedDataObj.table1);
|
|
614
|
+
_b = expect;
|
|
615
|
+
return [4 /*yield*/, getOutputJson()];
|
|
616
|
+
case 3:
|
|
617
|
+
_b.apply(void 0, [(_c.sent()).table2]).toEqual(expectedDataObj.table2);
|
|
586
618
|
return [2 /*return*/];
|
|
587
619
|
}
|
|
588
620
|
});
|
|
@@ -76,7 +76,7 @@ var saveLog = function (outDirectory, test, log, lineBreak) {
|
|
|
76
76
|
return __generator(this, function (_a) {
|
|
77
77
|
switch (_a.label) {
|
|
78
78
|
case 0:
|
|
79
|
-
logPath = path_1.default.join(outDirectory, 'logs', test.replace(file_1.sasFileRegExp, '').split(
|
|
79
|
+
logPath = path_1.default.join(outDirectory, 'logs', test.replace(file_1.sasFileRegExp, '').split('/').slice(1).join('_') + '.log');
|
|
80
80
|
return [4 /*yield*/, utils_1.createFile(logPath, log)];
|
|
81
81
|
case 1:
|
|
82
82
|
_a.sent();
|
|
@@ -6,9 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getLogFilePath = void 0;
|
|
7
7
|
var path_1 = __importDefault(require("path"));
|
|
8
8
|
var getLogFilePath = function (logArg, jobPath) {
|
|
9
|
-
if (logArg === undefined || !jobPath || jobPath === '')
|
|
9
|
+
if (logArg === undefined || !jobPath || jobPath === '')
|
|
10
10
|
return undefined;
|
|
11
|
-
}
|
|
12
11
|
if (logArg) {
|
|
13
12
|
var currentDirPath = path_1.default.isAbsolute(logArg)
|
|
14
13
|
? ''
|
package/build/utils/utils.js
CHANGED
|
@@ -410,7 +410,7 @@ function executeShellScript(filePath, logFilePath) {
|
|
|
410
410
|
return __generator(this, function (_b) {
|
|
411
411
|
switch (_b.label) {
|
|
412
412
|
case 0:
|
|
413
|
-
shellCommand = exports.isWindows() ? "" + filePath : "bash " + filePath;
|
|
413
|
+
shellCommand = exports.isWindows() ? "sh " + filePath : "bash " + filePath;
|
|
414
414
|
result = shelljs_1.default.exec(shellCommand, { silent: true });
|
|
415
415
|
if (!result.code) return [3 /*break*/, 1];
|
|
416
416
|
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Error: " + result.stderr);
|
package/package.json
CHANGED