Skip to content

Commit e744d43

Browse files
authored
chore: remove httpbinorg request from integration tests (#1194)
* chore: change request url * tests: replace url in test assertions * tests: add timeout to requests
1 parent b9d1977 commit e744d43

8 files changed

+44
-44
lines changed

packages/tracer/tests/e2e/allFeatures.decorator.test.functionCode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class MyFunctionBase {
5858
return Promise.all([
5959
dynamoDBv2.put({ TableName: testTableName, Item: { id: `${serviceName}-${event.invocation}-sdkv2` } }).promise(),
6060
dynamoDBv3.send(new PutItemCommand({ TableName: testTableName, Item: { id: { 'S': `${serviceName}-${event.invocation}-sdkv3` } } })),
61-
axios.get('https://httpbin.org/status/200'),
61+
axios.get('https://awslabs.github.io/aws-lambda-powertools-typescript/latest/', { timeout: 5000 }),
6262
new Promise((resolve, reject) => {
6363
setTimeout(() => {
6464
const res = this.myMethod();

packages/tracer/tests/e2e/allFeatures.decorator.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
206206
* 2. Lambda Function (AWS::Lambda::Function)
207207
* 3. DynamoDB (AWS::DynamoDB)
208208
* 4. DynamoDB Table (AWS::DynamoDB::Table)
209-
* 5. Remote call (httpbin.org)
209+
* 5. Remote call (awslabs.github.io)
210210
*/
211211
expect(trace.Segments.length).toBe(5);
212212
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -216,7 +216,7 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
216216
* '## index.handler' subsegment should have 4 subsegments
217217
* 1. DynamoDB (PutItem on the table)
218218
* 2. DynamoDB (PutItem overhead)
219-
* 3. httpbin.org (Remote call)
219+
* 3. awslabs.github.io (Remote call)
220220
* 4. '### myMethod' (method decorator)
221221
*/
222222
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
@@ -226,9 +226,9 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
226226
if (!handlerSubsegment.subsegments) {
227227
fail('"## index.handler" subsegment should have subsegments');
228228
}
229-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org', '### myMethod' ]);
229+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io', '### myMethod' ]);
230230
expect(subsegments.get('DynamoDB')?.length).toBe(2);
231-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
231+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
232232
expect(subsegments.get('### myMethod')?.length).toBe(1);
233233
expect(subsegments.get('other')?.length).toBe(0);
234234

@@ -289,7 +289,7 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
289289
* 2. Lambda Function (AWS::Lambda::Function)
290290
* 3. DynamoDB (AWS::DynamoDB)
291291
* 4. DynamoDB Table (AWS::DynamoDB::Table)
292-
* 5. Remote call (httpbin.org)
292+
* 5. Remote call (awslabs.github.io)
293293
*/
294294
expect(trace.Segments.length).toBe(5);
295295
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -299,7 +299,7 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
299299
* '## index.handler' subsegment should have 4 subsegments
300300
* 1. DynamoDB (PutItem on the table)
301301
* 2. DynamoDB (PutItem overhead)
302-
* 3. httpbin.org (Remote call)
302+
* 3. awslabs.github.io (Remote call)
303303
* 4. '### myMethod' (method decorator)
304304
*/
305305
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
@@ -309,9 +309,9 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
309309
if (!handlerSubsegment.subsegments) {
310310
fail('"## index.handler" subsegment should have subsegments');
311311
}
312-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org', '### myMethod' ]);
312+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io', '### myMethod' ]);
313313
expect(subsegments.get('DynamoDB')?.length).toBe(2);
314-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
314+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
315315
expect(subsegments.get('### myMethod')?.length).toBe(1);
316316
expect(subsegments.get('other')?.length).toBe(0);
317317

@@ -343,7 +343,7 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
343343
* 2. Lambda Function (AWS::Lambda::Function)
344344
* 3. DynamoDB (AWS::DynamoDB)
345345
* 4. DynamoDB Table (AWS::DynamoDB::Table)
346-
* 5. Remote call (httpbin.org)
346+
* 5. Remote call (awslabs.github.io)
347347
*/
348348
expect(trace.Segments.length).toBe(5);
349349
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -353,7 +353,7 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
353353
* '## index.handler' subsegment should have 4 subsegments
354354
* 1. DynamoDB (PutItem on the table)
355355
* 2. DynamoDB (PutItem overhead)
356-
* 3. httpbin.org (Remote call)
356+
* 3. awslabs.github.io (Remote call)
357357
* 4. '### myMethod' (method decorator)
358358
*/
359359
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
@@ -363,9 +363,9 @@ describe(`Tracer E2E tests, all features with decorator instantiation for runtim
363363
if (!handlerSubsegment.subsegments) {
364364
fail('"## index.handlerWithCaptureResponseFalse" subsegment should have subsegments');
365365
}
366-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org', '### myMethod' ]);
366+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io', '### myMethod' ]);
367367
expect(subsegments.get('DynamoDB')?.length).toBe(2);
368-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
368+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
369369
expect(subsegments.get('### myMethod')?.length).toBe(1);
370370
expect(subsegments.get('other')?.length).toBe(0);
371371

packages/tracer/tests/e2e/allFeatures.manual.test.functionCode.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const serviceName = process.env.EXPECTED_SERVICE_NAME ?? 'MyFunctionWithStandard
99
const customAnnotationKey = process.env.EXPECTED_CUSTOM_ANNOTATION_KEY ?? 'myAnnotation';
1010
const customAnnotationValue = process.env.EXPECTED_CUSTOM_ANNOTATION_VALUE ?? 'myValue';
1111
const customMetadataKey = process.env.EXPECTED_CUSTOM_METADATA_KEY ?? 'myMetadata';
12-
const customMetadataValue = JSON.parse(process.env.EXPECTED_CUSTOM_METADATA_VALUE) ?? { bar: 'baz' };
13-
const customResponseValue = JSON.parse(process.env.EXPECTED_CUSTOM_RESPONSE_VALUE) ?? { foo: 'bar' };
12+
const customMetadataValue = process.env.EXPECTED_CUSTOM_METADATA_VALUE ? JSON.parse(process.env.EXPECTED_CUSTOM_METADATA_VALUE) : { bar: 'baz' };
13+
const customResponseValue = process.env.EXPECTED_CUSTOM_RESPONSE_VALUE ? JSON.parse(process.env.EXPECTED_CUSTOM_RESPONSE_VALUE) : { foo: 'bar' };
1414
const customErrorMessage = process.env.EXPECTED_CUSTOM_ERROR_MESSAGE ?? 'An error has occurred';
1515
const testTableName = process.env.TEST_TABLE_NAME ?? 'TestTable';
1616

@@ -58,7 +58,7 @@ export const handler = async (event: CustomEvent, _context: Context): Promise<vo
5858
try {
5959
await dynamoDBv2.put({ TableName: testTableName, Item: { id: `${serviceName}-${event.invocation}-sdkv2` } }).promise();
6060
await dynamoDBv3.send(new PutItemCommand({ TableName: testTableName, Item: { id: { 'S': `${serviceName}-${event.invocation}-sdkv3` } } }));
61-
await axios.get('https://httpbin.org/status/200');
61+
await axios.get('https://awslabs.github.io/aws-lambda-powertools-typescript/latest/', { timeout: 5000 });
6262

6363
const res = customResponseValue;
6464
if (event.throw) {

packages/tracer/tests/e2e/allFeatures.manual.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ describe(`Tracer E2E tests, all features with manual instantiation for runtime:
128128
* 2. Lambda Function (AWS::Lambda::Function)
129129
* 3. DynamoDB (AWS::DynamoDB)
130130
* 4. DynamoDB Table (AWS::DynamoDB::Table)
131-
* 5. Remote call (httpbin.org)
131+
* 5. Remote call (awslabs.github.io)
132132
*/
133133
expect(trace.Segments.length).toBe(5);
134134
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -138,7 +138,7 @@ describe(`Tracer E2E tests, all features with manual instantiation for runtime:
138138
* '## index.handler' subsegment should have 3 subsegments
139139
* 1. DynamoDB (PutItem on the table)
140140
* 2. DynamoDB (PutItem overhead)
141-
* 3. httpbin.org (Remote call)
141+
* 3. awslabs.github.io (Remote call)
142142
*/
143143
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
144144
expect(handlerSubsegment.name).toBe('## index.handler');
@@ -147,9 +147,9 @@ describe(`Tracer E2E tests, all features with manual instantiation for runtime:
147147
if (!handlerSubsegment.subsegments) {
148148
fail('"## index.handler" subsegment should have subsegments');
149149
}
150-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org' ]);
150+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io' ]);
151151
expect(subsegments.get('DynamoDB')?.length).toBe(2);
152-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
152+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
153153
expect(subsegments.get('other')?.length).toBe(0);
154154

155155
const shouldThrowAnError = (i === (invocations - 1));

packages/tracer/tests/e2e/allFeatures.middy.test.functionCode.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const serviceName = process.env.EXPECTED_SERVICE_NAME ?? 'MyFunctionWithStandard
1010
const customAnnotationKey = process.env.EXPECTED_CUSTOM_ANNOTATION_KEY ?? 'myAnnotation';
1111
const customAnnotationValue = process.env.EXPECTED_CUSTOM_ANNOTATION_VALUE ?? 'myValue';
1212
const customMetadataKey = process.env.EXPECTED_CUSTOM_METADATA_KEY ?? 'myMetadata';
13-
const customMetadataValue = JSON.parse(process.env.EXPECTED_CUSTOM_METADATA_VALUE) ?? { bar: 'baz' };
14-
const customResponseValue = JSON.parse(process.env.EXPECTED_CUSTOM_RESPONSE_VALUE) ?? { foo: 'bar' };
13+
const customMetadataValue = process.env.EXPECTED_CUSTOM_METADATA_VALUE ? JSON.parse(process.env.EXPECTED_CUSTOM_METADATA_VALUE) : { bar: 'baz' };
14+
const customResponseValue = process.env.EXPECTED_CUSTOM_RESPONSE_VALUE ? JSON.parse(process.env.EXPECTED_CUSTOM_RESPONSE_VALUE) : { foo: 'bar' };
1515
const customErrorMessage = process.env.EXPECTED_CUSTOM_ERROR_MESSAGE ?? 'An error has occurred';
1616
const testTableName = process.env.TEST_TABLE_NAME ?? 'TestTable';
1717

@@ -52,7 +52,7 @@ const testHandler = async (event: CustomEvent, _context: Context): Promise<void>
5252
try {
5353
await dynamoDBv2.put({ TableName: testTableName, Item: { id: `${serviceName}-${event.invocation}-sdkv2` } }).promise();
5454
await dynamoDBv3.send(new PutItemCommand({ TableName: testTableName, Item: { id: { 'S': `${serviceName}-${event.invocation}-sdkv3` } } }));
55-
await axios.get('https://httpbin.org/status/200');
55+
await axios.get('https://awslabs.github.io/aws-lambda-powertools-typescript/latest/', { timeout: 5000 });
5656

5757
const res = customResponseValue;
5858
if (event.throw) {

packages/tracer/tests/e2e/allFeatures.middy.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
206206
* 2. Lambda Function (AWS::Lambda::Function)
207207
* 3. DynamoDB (AWS::DynamoDB)
208208
* 4. DynamoDB Table (AWS::DynamoDB::Table)
209-
* 5. Remote call (httpbin.org)
209+
* 5. Remote call (awslabs.github.io)
210210
*/
211211
expect(trace.Segments.length).toBe(5);
212212
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -216,7 +216,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
216216
* '## index.handler' subsegment should have 3 subsegments
217217
* 1. DynamoDB (PutItem on the table)
218218
* 2. DynamoDB (PutItem overhead)
219-
* 3. httpbin.org (Remote call)
219+
* 3. awslabs.github.io (Remote call)
220220
*/
221221
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
222222
expect(handlerSubsegment.name).toBe('## index.handler');
@@ -225,9 +225,9 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
225225
if (!handlerSubsegment.subsegments) {
226226
fail('"## index.handler" subsegment should have subsegments');
227227
}
228-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org' ]);
228+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io' ]);
229229
expect(subsegments.get('DynamoDB')?.length).toBe(2);
230-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
230+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
231231
expect(subsegments.get('other')?.length).toBe(0);
232232

233233
const shouldThrowAnError = (i === (invocations - 1));
@@ -287,7 +287,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
287287
* 2. Lambda Function (AWS::Lambda::Function)
288288
* 3. DynamoDB (AWS::DynamoDB)
289289
* 4. DynamoDB Table (AWS::DynamoDB::Table)
290-
* 5. Remote call (httpbin.org)
290+
* 5. Remote call (awslabs.github.io)
291291
*/
292292
expect(trace.Segments.length).toBe(5);
293293
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -297,7 +297,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
297297
* '## index.handler' subsegment should have 3 subsegments
298298
* 1. DynamoDB (PutItem on the table)
299299
* 2. DynamoDB (PutItem overhead)
300-
* 3. httpbin.org (Remote call)
300+
* 3. awslabs.github.io (Remote call)
301301
*/
302302
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
303303
expect(handlerSubsegment.name).toBe('## index.handler');
@@ -306,9 +306,9 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
306306
if (!handlerSubsegment.subsegments) {
307307
fail('"## index.handler" subsegment should have subsegments');
308308
}
309-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org' ]);
309+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io' ]);
310310
expect(subsegments.get('DynamoDB')?.length).toBe(2);
311-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
311+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
312312
expect(subsegments.get('other')?.length).toBe(0);
313313

314314
const shouldThrowAnError = (i === (invocations - 1));
@@ -339,7 +339,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
339339
* 2. Lambda Function (AWS::Lambda::Function)
340340
* 3. DynamoDB (AWS::DynamoDB)
341341
* 4. DynamoDB Table (AWS::DynamoDB::Table)
342-
* 5. Remote call (httpbin.org)
342+
* 5. Remote call (awslabs.github.io)
343343
*/
344344
expect(trace.Segments.length).toBe(5);
345345
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -349,7 +349,7 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
349349
* '## index.handlerWithNoCaptureResponseViaMiddlewareOption' subsegment should have 3 subsegments
350350
* 1. DynamoDB (PutItem on the table)
351351
* 2. DynamoDB (PutItem overhead)
352-
* 3. httpbin.org (Remote call)
352+
* 3. awslabs.github.io (Remote call)
353353
*/
354354
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
355355
expect(handlerSubsegment.name).toBe('## index.handlerWithNoCaptureResponseViaMiddlewareOption');
@@ -358,9 +358,9 @@ describe(`Tracer E2E tests, all features with middy instantiation for runtime: $
358358
if (!handlerSubsegment.subsegments) {
359359
fail('"## index.handlerWithNoCaptureResponseViaMiddlewareOption" subsegment should have subsegments');
360360
}
361-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org' ]);
361+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io' ]);
362362
expect(subsegments.get('DynamoDB')?.length).toBe(2);
363-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
363+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
364364
expect(subsegments.get('other')?.length).toBe(0);
365365

366366
const shouldThrowAnError = (i === (invocations - 1));

packages/tracer/tests/e2e/asyncHandler.decorator.test.functionCode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class MyFunctionBase {
5959
try {
6060
await dynamoDBv2.put({ TableName: testTableName, Item: { id: `${serviceName}-${event.invocation}-sdkv2` } }).promise();
6161
await dynamoDBv3.send(new PutItemCommand({ TableName: testTableName, Item: { id: { 'S': `${serviceName}-${event.invocation}-sdkv3` } } }));
62-
await axios.get('https://httpbin.org/status/200');
62+
await axios.get('https://awslabs.github.io/aws-lambda-powertools-typescript/latest/', { timeout: 5000 });
6363

6464
const res = this.myMethod();
6565
if (event.throw) {

packages/tracer/tests/e2e/asyncHandler.decorator.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ describe(`Tracer E2E tests, asynchronous handler with decorator instantiation fo
155155
* 2. Lambda Function (AWS::Lambda::Function)
156156
* 3. DynamoDB (AWS::DynamoDB)
157157
* 4. DynamoDB Table (AWS::DynamoDB::Table)
158-
* 5. Remote call (httpbin.org)
158+
* 5. Remote call (awslabs.github.io)
159159
*/
160160
expect(trace.Segments.length).toBe(5);
161161
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -165,7 +165,7 @@ describe(`Tracer E2E tests, asynchronous handler with decorator instantiation fo
165165
* '## index.handler' subsegment should have 4 subsegments
166166
* 1. DynamoDB (PutItem on the table)
167167
* 2. DynamoDB (PutItem overhead)
168-
* 3. httpbin.org (Remote call)
168+
* 3. awslabs.github.io (Remote call)
169169
* 4. '### myMethod' (method decorator)
170170
*/
171171
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
@@ -175,9 +175,9 @@ describe(`Tracer E2E tests, asynchronous handler with decorator instantiation fo
175175
if (!handlerSubsegment.subsegments) {
176176
fail('"## index.handler" subsegment should have subsegments');
177177
}
178-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org', '### myMethod' ]);
178+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io', '### myMethod' ]);
179179
expect(subsegments.get('DynamoDB')?.length).toBe(2);
180-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
180+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
181181
expect(subsegments.get('### myMethod')?.length).toBe(1);
182182
expect(subsegments.get('other')?.length).toBe(0);
183183

@@ -238,7 +238,7 @@ describe(`Tracer E2E tests, asynchronous handler with decorator instantiation fo
238238
* 2. Lambda Function (AWS::Lambda::Function)
239239
* 3. DynamoDB (AWS::DynamoDB)
240240
* 4. DynamoDB Table (AWS::DynamoDB::Table)
241-
* 5. Remote call (httpbin.org)
241+
* 5. Remote call (awslabs.github.io)
242242
*/
243243
expect(trace.Segments.length).toBe(5);
244244
const invocationSubsegment = getInvocationSubsegment(trace);
@@ -248,7 +248,7 @@ describe(`Tracer E2E tests, asynchronous handler with decorator instantiation fo
248248
* '## index.handler' subsegment should have 4 subsegments
249249
* 1. DynamoDB (PutItem on the table)
250250
* 2. DynamoDB (PutItem overhead)
251-
* 3. httpbin.org (Remote call)
251+
* 3. awslabs.github.io (Remote call)
252252
* 4. '### mySubsegment' (method decorator with custom name)
253253
*/
254254
const handlerSubsegment = getFirstSubsegment(invocationSubsegment);
@@ -258,9 +258,9 @@ describe(`Tracer E2E tests, asynchronous handler with decorator instantiation fo
258258
if (!handlerSubsegment.subsegments) {
259259
fail('"## index.handler" subsegment should have subsegments');
260260
}
261-
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'httpbin.org', expectedCustomSubSegmentName ]);
261+
const subsegments = splitSegmentsByName(handlerSubsegment.subsegments, [ 'DynamoDB', 'awslabs.github.io', expectedCustomSubSegmentName ]);
262262
expect(subsegments.get('DynamoDB')?.length).toBe(2);
263-
expect(subsegments.get('httpbin.org')?.length).toBe(1);
263+
expect(subsegments.get('awslabs.github.io')?.length).toBe(1);
264264
expect(subsegments.get(expectedCustomSubSegmentName)?.length).toBe(1);
265265
expect(subsegments.get('other')?.length).toBe(0);
266266

0 commit comments

Comments
 (0)