Skip to content

Commit

Permalink
Fix few test with incorrect mock AWS account id
Browse files Browse the repository at this point in the history
  • Loading branch information
duranbe committed Jun 29, 2024
1 parent aed7e0a commit 90bdc20
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-iam/test/role.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ describe('IAM role', () => {
});

// THEN
expect(() => role.grantAssumeRole(new AccountPrincipal('123456789')))
expect(() => role.grantAssumeRole(new AccountPrincipal('123456789012')))
.toThrow('Cannot use a service or account principal with grantAssumeRole, use assumeRolePolicy instead.');
});

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-lambda/test/function-url.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe('FunctionUrl', () => {
// GIVEN
const stack = new cdk.Stack();
const role = new iam.Role(stack, 'Role', {
assumedBy: new iam.AccountPrincipal('1234'),
assumedBy: new iam.AccountPrincipal('123456789012'),
});
const fn = new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('hello()'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ test('grantRead cross account', () => {
// GIVEN
const key = new kms.Key(stack, 'KMS');
const secret = new secretsmanager.Secret(stack, 'Secret', { encryptionKey: key });
const principal = new iam.AccountPrincipal('1234');
const principal = new iam.AccountPrincipal('123456789012');

// WHEN
secret.grantRead(principal, ['FOO', 'bar']).assertSuccess();
Expand Down

0 comments on commit 90bdc20

Please sign in to comment.