5
5
*/
6
6
7
7
import path from 'path' ;
8
- import { Table , AttributeType , BillingMode } from 'aws-cdk-lib/aws-dynamodb' ;
9
- import { App , Stack , RemovalPolicy } from 'aws-cdk-lib' ;
8
+ import { AttributeType , BillingMode , Table } from 'aws-cdk-lib/aws-dynamodb' ;
9
+ import { App , RemovalPolicy , Stack } from 'aws-cdk-lib' ;
10
10
import { XRayClient } from '@aws-sdk/client-xray' ;
11
11
import { STSClient } from '@aws-sdk/client-sts' ;
12
12
import { v4 } from 'uuid' ;
@@ -15,29 +15,29 @@ import {
15
15
destroyStack ,
16
16
} from '../../../commons/tests/utils/cdk-cli' ;
17
17
import {
18
- getTraces ,
19
- getInvocationSubsegment ,
20
- splitSegmentsByName ,
21
- invokeAllTestCases ,
22
18
createTracerTestFunction ,
23
- getFunctionArn ,
24
19
getFirstSubsegment ,
20
+ getFunctionArn ,
21
+ getInvocationSubsegment ,
22
+ getTraces ,
23
+ invokeAllTestCases ,
24
+ splitSegmentsByName ,
25
25
} from '../helpers/tracesUtils' ;
26
26
import {
27
27
generateUniqueName ,
28
28
isValidRuntimeKey ,
29
29
} from '../../../commons/tests/utils/e2eUtils' ;
30
30
import {
31
- RESOURCE_NAME_PREFIX ,
32
- SETUP_TIMEOUT ,
33
- TEARDOWN_TIMEOUT ,
34
- TEST_CASE_TIMEOUT ,
35
31
expectedCustomAnnotationKey ,
36
32
expectedCustomAnnotationValue ,
33
+ expectedCustomErrorMessage ,
37
34
expectedCustomMetadataKey ,
38
35
expectedCustomMetadataValue ,
39
36
expectedCustomResponseValue ,
40
- expectedCustomErrorMessage ,
37
+ RESOURCE_NAME_PREFIX ,
38
+ SETUP_TIMEOUT ,
39
+ TEARDOWN_TIMEOUT ,
40
+ TEST_CASE_TIMEOUT ,
41
41
} from './constants' ;
42
42
import {
43
43
assertAnnotation ,
@@ -246,7 +246,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
246
246
* 1. Lambda Context (AWS::Lambda)
247
247
* 2. Lambda Function (AWS::Lambda::Function)
248
248
* 3. DynamoDB Table (AWS::DynamoDB::Table)
249
- * 4. Remote call (awslabs.github.io )
249
+ * 4. Remote call (docs.powertools.aws.dev )
250
250
*/
251
251
expect ( trace . Segments . length ) . toBe ( 4 ) ;
252
252
const invocationSubsegment = getInvocationSubsegment ( trace ) ;
@@ -255,7 +255,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
255
255
* Invocation subsegment should have a subsegment '## index.handler' (default behavior for Tracer)
256
256
* '## index.handler' subsegment should have 2 subsegments
257
257
* 1. DynamoDB (PutItem on the table)
258
- * 2. awslabs.github.io (Remote call)
258
+ * 2. docs.powertools.aws.dev (Remote call)
259
259
*/
260
260
const handlerSubsegment = getFirstSubsegment ( invocationSubsegment ) ;
261
261
expect ( handlerSubsegment . name ) . toBe ( '## index.handler' ) ;
@@ -266,10 +266,10 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
266
266
}
267
267
const subsegments = splitSegmentsByName ( handlerSubsegment . subsegments , [
268
268
'DynamoDB' ,
269
- 'awslabs.github.io ' ,
269
+ 'docs.powertools.aws.dev ' ,
270
270
] ) ;
271
271
expect ( subsegments . get ( 'DynamoDB' ) ?. length ) . toBe ( 1 ) ;
272
- expect ( subsegments . get ( 'awslabs.github.io ' ) ?. length ) . toBe ( 1 ) ;
272
+ expect ( subsegments . get ( 'docs.powertools.aws.dev ' ) ?. length ) . toBe ( 1 ) ;
273
273
expect ( subsegments . get ( 'other' ) ?. length ) . toBe ( 0 ) ;
274
274
275
275
const shouldThrowAnError = i === invocations - 1 ;
@@ -351,7 +351,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
351
351
* 1. Lambda Context (AWS::Lambda)
352
352
* 2. Lambda Function (AWS::Lambda::Function)
353
353
* 3. DynamoDB Table (AWS::DynamoDB::Table)
354
- * 4. Remote call (awslabs.github.io )
354
+ * 4. Remote call (docs.powertools.aws.dev )
355
355
*/
356
356
expect ( trace . Segments . length ) . toBe ( 4 ) ;
357
357
const invocationSubsegment = getInvocationSubsegment ( trace ) ;
@@ -360,7 +360,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
360
360
* Invocation subsegment should have a subsegment '## index.handler' (default behavior for Tracer)
361
361
* '## index.handler' subsegment should have 2 subsegments
362
362
* 1. DynamoDB (PutItem on the table)
363
- * 2. awslabs.github.io (Remote call)
363
+ * 2. docs.powertools.aws.dev (Remote call)
364
364
*/
365
365
const handlerSubsegment = getFirstSubsegment ( invocationSubsegment ) ;
366
366
expect ( handlerSubsegment . name ) . toBe ( '## index.handler' ) ;
@@ -371,10 +371,10 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
371
371
}
372
372
const subsegments = splitSegmentsByName ( handlerSubsegment . subsegments , [
373
373
'DynamoDB' ,
374
- 'awslabs.github.io ' ,
374
+ 'docs.powertools.aws.dev ' ,
375
375
] ) ;
376
376
expect ( subsegments . get ( 'DynamoDB' ) ?. length ) . toBe ( 1 ) ;
377
- expect ( subsegments . get ( 'awslabs.github.io ' ) ?. length ) . toBe ( 1 ) ;
377
+ expect ( subsegments . get ( 'docs.powertools.aws.dev ' ) ?. length ) . toBe ( 1 ) ;
378
378
expect ( subsegments . get ( 'other' ) ?. length ) . toBe ( 0 ) ;
379
379
380
380
const shouldThrowAnError = i === invocations - 1 ;
@@ -415,7 +415,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
415
415
* 1. Lambda Context (AWS::Lambda)
416
416
* 2. Lambda Function (AWS::Lambda::Function)
417
417
* 3. DynamoDB Table (AWS::DynamoDB::Table)
418
- * 4. Remote call (awslabs.github.io )
418
+ * 4. Remote call (docs.powertools.aws.dev )
419
419
*/
420
420
expect ( trace . Segments . length ) . toBe ( 4 ) ;
421
421
const invocationSubsegment = getInvocationSubsegment ( trace ) ;
@@ -424,7 +424,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
424
424
* Invocation subsegment should have a subsegment '## index.handlerWithNoCaptureResponseViaMiddlewareOption' (default behavior for Tracer)
425
425
* '## index.handlerWithNoCaptureResponseViaMiddlewareOption' subsegment should have 2 subsegments
426
426
* 1. DynamoDB (PutItem on the table)
427
- * 2. awslabs.github.io (Remote call)
427
+ * 2. docs.powertools.aws.dev (Remote call)
428
428
*/
429
429
const handlerSubsegment = getFirstSubsegment ( invocationSubsegment ) ;
430
430
expect ( handlerSubsegment . name ) . toBe (
@@ -439,10 +439,10 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
439
439
}
440
440
const subsegments = splitSegmentsByName ( handlerSubsegment . subsegments , [
441
441
'DynamoDB' ,
442
- 'awslabs.github.io ' ,
442
+ 'docs.powertools.aws.dev ' ,
443
443
] ) ;
444
444
expect ( subsegments . get ( 'DynamoDB' ) ?. length ) . toBe ( 1 ) ;
445
- expect ( subsegments . get ( 'awslabs.github.io ' ) ?. length ) . toBe ( 1 ) ;
445
+ expect ( subsegments . get ( 'docs.powertools.aws.dev ' ) ?. length ) . toBe ( 1 ) ;
446
446
expect ( subsegments . get ( 'other' ) ?. length ) . toBe ( 0 ) ;
447
447
448
448
const shouldThrowAnError = i === invocations - 1 ;
0 commit comments