Skip to content

Commit

Permalink
fix(aws-lambda) update test to set correct adot version when comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
randyridgley committed Jul 18, 2023
1 parent 7284055 commit cdeb120
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/aws-cdk-lib/aws-lambda/test/adot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@ describe('ADOT Lambda Layer', () => {
fn = new lambda.Function(stack, 'Function', {
code: lambda.Code.fromBucket(bucket, 'mock_key'),
handler: 'index.handler',
runtime: lambda.Runtime.PYTHON_3_10,
runtime: lambda.Runtime.PYTHON_3_11,
});
});

test('is added properly when the region information is available at synthesis time', () => {
const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.V1_18_0.layerArn(fn.stack, fn.architecture);

expect(layerArn).toEqual(
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-wrapper-amd64-ver-1-18-0:1',
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2',
);
});

test('is added properly when using "LATEST" version', () => {
const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.LATEST.layerArn(fn.stack, fn.architecture);

expect(layerArn).toEqual(
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-wrapper-amd64-ver-1-18-0:1',
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2',
);
});
});
Expand Down

0 comments on commit cdeb120

Please sign in to comment.