Skip to content

Commit

Permalink
chore: update assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfoyle committed Jan 17, 2024
1 parent 4667934 commit a763a4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/amplify-e2e-tests/src/aws-matchers/iamMatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const toHaveDenyAssumeRolePolicy = async (roleName: string) => {
const { Role: role } = await iam.getRole({ RoleName: roleName }).promise();
const assumeRolePolicyDocument = JSON.parse(decodeURIComponent(role.AssumeRolePolicyDocument));

pass = assumeRolePolicyDocument?.Statement?.Effect === 'Deny';
pass = assumeRolePolicyDocument?.Statement?.length === 1 && assumeRolePolicyDocument?.Statement?.[0]?.Effect === 'Deny';

message = pass
? 'Assume role policy has Effect: Deny'
Expand Down

0 comments on commit a763a4d

Please sign in to comment.