Skip to content

Commit

Permalink
chore: upgrade test dependencies on urllib3 & pillow (#17985)
Browse files Browse the repository at this point in the history
The current pinned versions of urllib3 and Pillow have known security
vulnerabilities. Upgrading those to fixed versions to remove the
security advisory alerts against the repository.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Romain Marcadier committed Dec 14, 2021
1 parent c4ecd96 commit 2d2c109
Show file tree
Hide file tree
Showing 22 changed files with 297 additions and 479 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('lambda', () => {
const stack = new cdk.Stack();
const api = new apigateway.RestApi(stack, 'my-api');
const handler = new lambda.Function(stack, 'Handler', {
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
handler: 'boom',
code: lambda.Code.fromInline('foo'),
});
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-cloudformation/test/resource.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ testDeprecated('custom resource is added twice, lambda is added once', () => {
'Arn',
],
},
'Runtime': 'python2.7',
'Runtime': 'python3.9',
'Timeout': 300,
},
'DependsOn': [
Expand Down Expand Up @@ -208,7 +208,7 @@ class TestCustomResource extends Construct {
const singletonLambda = new lambda.SingletonFunction(this, 'Lambda', {
uuid: 'TestCustomResourceProvider',
code: new lambda.InlineCode('def hello(): pass'),
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
handler: 'index.hello',
timeout: cdk.Duration.minutes(5),
});
Expand Down
14 changes: 7 additions & 7 deletions packages/@aws-cdk/aws-events-targets/test/lambda/lambda.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test('adding same singleton lambda function as target mutiple times creates perm
const fn = new lambda.SingletonFunction(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'bar',
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
uuid: 'uuid',
});
const rule = new events.Rule(stack, 'Rule', {
Expand All @@ -133,7 +133,7 @@ test('lambda handler and cloudwatch event across stacks', () => {
const fn = new lambda.Function(lambdaStack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'bar',
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
});

const eventStack = new cdk.Stack(app, 'EventStack');
Expand All @@ -156,7 +156,7 @@ test('use a Dead Letter Queue for the rule target', () => {
const fn = new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'bar',
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
});

const queue = new sqs.Queue(stack, 'Queue');
Expand Down Expand Up @@ -248,7 +248,7 @@ test('throw an error when using a Dead Letter Queue for the rule target in a dif
const fn = new lambda.Function(stack1, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'bar',
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
});

const queue = new sqs.Queue(stack2, 'Queue');
Expand Down Expand Up @@ -285,7 +285,7 @@ test('must display a warning when using a Dead Letter Queue from another account
const fn = new lambda.Function(stack1, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'bar',
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
});

const queue = sqs.Queue.fromQueueArn(stack2, 'Queue', 'arn:aws:sqs:eu-west-1:444455556666:queue1');
Expand Down Expand Up @@ -334,7 +334,7 @@ test('specifying retry policy', () => {
const fn = new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'bar',
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
});

// WHEN
Expand Down Expand Up @@ -375,6 +375,6 @@ function newTestLambda(scope: constructs.Construct, suffix = '') {
return new lambda.Function(scope, `MyLambda${suffix}`, {
code: new lambda.InlineCode('foo'),
handler: 'bar',
runtime: lambda.Runtime.PYTHON_2_7,
runtime: lambda.Runtime.PYTHON_3_9,
});
}
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test('Bundling a layer with dependencies', () => {

bundle({
entry: entry,
runtime: Runtime.PYTHON_2_7,
runtime: Runtime.PYTHON_3_9,
architecture: Architecture.X86_64,
outputPathSuffix: 'python',
});
Expand All @@ -116,7 +116,7 @@ test('Bundling a python code layer', () => {

bundle({
entry: path.join(entry, '.'),
runtime: Runtime.PYTHON_2_7,
runtime: Runtime.PYTHON_3_9,
architecture: Architecture.X86_64,
outputPathSuffix: 'python',
});
Expand Down
Loading

0 comments on commit 2d2c109

Please sign in to comment.