Skip to content

Commit

Permalink
fix(lambda): assert error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Aug 8, 2024
1 parent 06ad31b commit 0e9cb46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-lambda/test/function.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2950,7 +2950,7 @@ describe('function', () => {
code: lambda.Code.fromAsset(path.join(__dirname, 'handler.zip')),
filesystem: lambda.FileSystem.fromEfsAccessPoint(accessPoint, '/not-mnt/foo-bar'),
});
}).toThrow();
}).toThrow('Local mount path should match with ^/mnt/[a-zA-Z0-9-_.]+$ but given /not-mnt/foo-bar');
});

test('validate localMountPath length when mounting efs', () => {
Expand Down Expand Up @@ -2980,7 +2980,7 @@ describe('function', () => {
code: lambda.Code.fromAsset(path.join(__dirname, 'handler.zip')),
filesystem: lambda.FileSystem.fromEfsAccessPoint(accessPoint, `/mnt/${'a'.repeat(160)}`),
});
}).toThrow();
}).toThrow('Local mount path can not be longer than 160 characters but has 165 characters');
});

test('correct security group is created when deployed in separate stacks', () => {
Expand Down

0 comments on commit 0e9cb46

Please sign in to comment.