@@ -53,7 +53,7 @@ describe('Endpoints', function () {
53
53
54
54
describe ( 'Search' , ( ) => {
55
55
it ( '[Search-0001] Execute a search without a limit including all requests from instance-1' , ( ) => {
56
- return requestAsync ( {
56
+ return await requestAsync ( {
57
57
method : 'GET' ,
58
58
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search` ,
59
59
headers : {
@@ -79,7 +79,7 @@ describe('Endpoints', function () {
79
79
user : server . apibuilder . config . apikey || 'test' ,
80
80
password : ''
81
81
} ;
82
- return requestAsync ( {
82
+ return await requestAsync ( {
83
83
method : 'GET' ,
84
84
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-2/ops/search` ,
85
85
headers : {
@@ -101,7 +101,7 @@ describe('Endpoints', function () {
101
101
user : server . apibuilder . config . apikey || 'test' ,
102
102
password : ''
103
103
} ;
104
- return requestAsync ( {
104
+ return await requestAsync ( {
105
105
method : 'GET' ,
106
106
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=uri&value=%2Fv2%2Fpet%2FfindByStatus&field=method&value=GET` ,
107
107
headers : {
@@ -124,7 +124,7 @@ describe('Endpoints', function () {
124
124
user : server . apibuilder . config . apikey || 'test' ,
125
125
password : ''
126
126
} ;
127
- return requestAsync ( {
127
+ return await requestAsync ( {
128
128
method : 'GET' ,
129
129
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=duration&op=gt&value=100` ,
130
130
headers : {
@@ -145,7 +145,7 @@ describe('Endpoints', function () {
145
145
user : server . apibuilder . config . apikey || 'test' ,
146
146
password : ''
147
147
} ;
148
- return requestAsync ( {
148
+ return await requestAsync ( {
149
149
method : 'GET' ,
150
150
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=operation&value=findPetsByStatus` ,
151
151
headers : {
@@ -167,7 +167,7 @@ describe('Endpoints', function () {
167
167
user : server . apibuilder . config . apikey || 'test' ,
168
168
password : ''
169
169
} ;
170
- return requestAsync ( {
170
+ return await requestAsync ( {
171
171
method : 'GET' ,
172
172
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?ago=5m` , // The first entry is generated with 8 minutes in the past
173
173
headers : {
@@ -195,7 +195,7 @@ describe('Endpoints', function () {
195
195
const greaterThenThisDate = getDate ( '10h' , true ) ;
196
196
const lowerThanThisDate = getDate ( '10m' , true ) ;
197
197
console . log ( `Query with greaterThenThisDate: ${ greaterThenThisDate } and lowerThanThisDate: ${ lowerThanThisDate } ` ) ;
198
- return requestAsync ( {
198
+ return await requestAsync ( {
199
199
method : 'GET' ,
200
200
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=timestamp&op=gt&value=${ greaterThenThisDate } &field=timestamp&op=lt&value=${ lowerThanThisDate } ` ,
201
201
headers : {
@@ -226,7 +226,7 @@ describe('Endpoints', function () {
226
226
const greaterThenThisDate = getDate ( '110h' , true ) ;
227
227
const lowerThanThisDate = getDate ( '5m' , true ) ;
228
228
console . log ( `Query with greaterThenThisDate: ${ greaterThenThisDate } and lowerThanThisDate: ${ lowerThanThisDate } ` ) ;
229
- return requestAsync ( {
229
+ return await requestAsync ( {
230
230
method : 'GET' ,
231
231
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=timestamp&op=gt&value=${ greaterThenThisDate } &field=timestamp&op=lt&value=${ lowerThanThisDate } ` ,
232
232
headers : {
@@ -246,7 +246,7 @@ describe('Endpoints', function () {
246
246
} ) ;
247
247
} ) ;
248
248
it ( '[Endpoint-0009] should return two entries with localport 8080' , ( ) => {
249
- return requestAsync ( {
249
+ return await requestAsync ( {
250
250
method : 'GET' ,
251
251
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=localPort&value=8080` ,
252
252
headers : {
@@ -264,7 +264,7 @@ describe('Endpoints', function () {
264
264
} ) ;
265
265
266
266
it ( '[Endpoint-0010A] should return one entry with localport 8080 and given subject-id' , ( ) => {
267
- return requestAsync ( {
267
+ return await requestAsync ( {
268
268
method : 'GET' ,
269
269
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=localPort&value=8080&field=subject&value=Chris-Test` ,
270
270
headers : {
@@ -281,8 +281,8 @@ describe('Endpoints', function () {
281
281
expect ( body . data [ 0 ] . subject ) . to . equals ( 'Chris-Test' ) ;
282
282
} ) ;
283
283
} ) ;
284
- it . only ( '[Endpoint-0010B] should return one entry with localport 8080 and a part of the original subject ID' , ( ) => {
285
- return requestAsync ( {
284
+ it ( '[Endpoint-0010B] should return one entry with localport 8080 and a part of the original subject ID' , ( ) => {
285
+ return await requestAsync ( {
286
286
method : 'GET' ,
287
287
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=localPort&value=8080&field=subject&value=Chris` ,
288
288
headers : {
@@ -300,7 +300,7 @@ describe('Endpoints', function () {
300
300
} ) ;
301
301
} ) ;
302
302
it ( '[Endpoint-0011] should return one entry with localport 8080 and given subject-id' , ( ) => {
303
- return requestAsync ( {
303
+ return await requestAsync ( {
304
304
method : 'GET' ,
305
305
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=status&value=404` ,
306
306
headers : {
@@ -318,7 +318,7 @@ describe('Endpoints', function () {
318
318
} ) ;
319
319
} ) ;
320
320
it ( '[Endpoint-0012] should return one entry with localadr 1.1.1.1' , ( ) => {
321
- return requestAsync ( {
321
+ return await requestAsync ( {
322
322
method : 'GET' ,
323
323
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=localAddr&value=1.1.1.1` ,
324
324
headers : {
@@ -336,7 +336,7 @@ describe('Endpoints', function () {
336
336
} ) ;
337
337
} ) ;
338
338
it ( '[Endpoint-0013] should return one entry with remoteName (remoteHost) TestHost' , ( ) => {
339
- return requestAsync ( {
339
+ return await requestAsync ( {
340
340
method : 'GET' ,
341
341
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=remoteName&value=TestHost` ,
342
342
headers : {
@@ -354,7 +354,7 @@ describe('Endpoints', function () {
354
354
} ) ;
355
355
} ) ;
356
356
it ( '[Endpoint-0014] should return one entry with remotePort 59641' , ( ) => {
357
- return requestAsync ( {
357
+ return await requestAsync ( {
358
358
method : 'GET' ,
359
359
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=remotePort&value=59641` ,
360
360
headers : {
@@ -372,7 +372,7 @@ describe('Endpoints', function () {
372
372
} ) ;
373
373
} ) ;
374
374
it ( '[Endpoint-0015] should return one entry with service name Petstore HTTP' , ( ) => {
375
- return requestAsync ( {
375
+ return await requestAsync ( {
376
376
method : 'GET' ,
377
377
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=serviceName&value=Petstore%20HTTP` ,
378
378
headers : {
@@ -391,7 +391,7 @@ describe('Endpoints', function () {
391
391
} ) ;
392
392
} ) ;
393
393
it ( '[Endpoint-0016] should return one entry WAF-Status 1' , ( ) => {
394
- return requestAsync ( {
394
+ return await requestAsync ( {
395
395
method : 'GET' ,
396
396
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=wafStatus&value=1` ,
397
397
headers : {
@@ -409,7 +409,7 @@ describe('Endpoints', function () {
409
409
} ) ;
410
410
} ) ;
411
411
it ( '[Endpoint-0017] should return one entry with the given correlation id' , ( ) => {
412
- return requestAsync ( {
412
+ return await requestAsync ( {
413
413
method : 'GET' ,
414
414
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=correlationId&value=682c0f5fbe23dc8e1d80efe2` ,
415
415
headers : {
@@ -427,7 +427,7 @@ describe('Endpoints', function () {
427
427
} ) ;
428
428
} ) ;
429
429
it ( '[Endpoint-0018] should return one entry with final status Error' , ( ) => {
430
- return requestAsync ( {
430
+ return await requestAsync ( {
431
431
method : 'GET' ,
432
432
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=finalStatus&value=Error` ,
433
433
headers : {
@@ -444,7 +444,7 @@ describe('Endpoints', function () {
444
444
} ) ;
445
445
} ) ;
446
446
it ( '[Endpoint-0019] should return results with a wildcard path.' , ( ) => {
447
- return requestAsync ( {
447
+ return await requestAsync ( {
448
448
method : 'GET' ,
449
449
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=uri&value=%2Fv2%2Fpet` ,
450
450
headers : {
@@ -462,7 +462,7 @@ describe('Endpoints', function () {
462
462
} ) ;
463
463
} ) ;
464
464
it ( '[Endpoint-0020] Should return 1 entry in the last 10 minutes (ago=10m)' , ( ) => {
465
- return requestAsync ( {
465
+ return await requestAsync ( {
466
466
method : 'GET' ,
467
467
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?ago=10m` ,
468
468
headers : {
@@ -479,7 +479,7 @@ describe('Endpoints', function () {
479
479
} ) ;
480
480
} ) ;
481
481
it ( '[Endpoint-0021] Should return 2 entries in the last 30 minutes (ago=30m)' , ( ) => {
482
- return requestAsync ( {
482
+ return await requestAsync ( {
483
483
method : 'GET' ,
484
484
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?ago=30m` ,
485
485
headers : {
@@ -496,7 +496,7 @@ describe('Endpoints', function () {
496
496
} ) ;
497
497
} ) ;
498
498
it ( '[Endpoint-0022] Should return 4 entries in the last 2 hours (ago=120h)' , ( ) => {
499
- return requestAsync ( {
499
+ return await requestAsync ( {
500
500
method : 'GET' ,
501
501
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?ago=2h` ,
502
502
headers : {
@@ -513,7 +513,7 @@ describe('Endpoints', function () {
513
513
} ) ;
514
514
} ) ;
515
515
it ( '[Endpoint-0023] Should include the V-Host value' , ( ) => {
516
- return requestAsync ( {
516
+ return await requestAsync ( {
517
517
method : 'GET' ,
518
518
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=correlationId&value=7a240f5f0e21555d2d343482` ,
519
519
headers : {
@@ -528,7 +528,7 @@ describe('Endpoints', function () {
528
528
} ) ;
529
529
} ) ;
530
530
it ( '[Endpoint-0024] Should not return anything when using the wrong request protocol.' , ( ) => {
531
- return requestAsync ( {
531
+ return await requestAsync ( {
532
532
method : 'GET' ,
533
533
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?protocol=filetransfer` ,
534
534
headers : {
@@ -544,7 +544,7 @@ describe('Endpoints', function () {
544
544
} ) ;
545
545
} ) ;
546
546
it ( '[Endpoint-0025] Should return the OPTIONS request including the URI' , ( ) => {
547
- return requestAsync ( {
547
+ return await requestAsync ( {
548
548
method : 'GET' ,
549
549
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-2/ops/search?protocol=http&field=method&value=OPTIONS` ,
550
550
headers : {
@@ -563,7 +563,7 @@ describe('Endpoints', function () {
563
563
564
564
// See issue #52
565
565
it ( '[Endpoint-0026] With query on v2/pet/findByTag should return only ONE API.' , ( ) => {
566
- return requestAsync ( {
566
+ return await requestAsync ( {
567
567
method : 'GET' ,
568
568
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=uri&value=%2Fpetstore%2Fv2%2Fpet%2FfindByTag&field=method&value=GET` ,
569
569
headers : {
@@ -582,7 +582,7 @@ describe('Endpoints', function () {
582
582
} ) ;
583
583
584
584
it ( '[Endpoint-0027] Should ignore the region if null' , ( ) => {
585
- return requestAsync ( {
585
+ return await requestAsync ( {
586
586
method : 'GET' ,
587
587
uri : `http://localhost:${ server . apibuilder . port } /api/elk/v1/api/router/service/instance-1/ops/search?field=uri&value=%2Fpetstore%2Fv2%2Fpet%2FfindByTag&field=method&value=GET` ,
588
588
headers : {
0 commit comments