Skip to content

Commit

Permalink
migrate new assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Wurstnase committed Jan 21, 2022
1 parent 828dc4a commit 7d324aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/@aws-cdk/aws-ecr/test/repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ describe('repository', () => {
new ecr.Repository(stack, 'Repo', { encryption: ecr.RepositoryEncryption.AES_256 });

// THEN
expectCDK(stack).toMatch({
Template.fromStack(stack).templateMatches({
Resources: {
Repo02AC86CF: {
Type: 'AWS::ECR::Repository',
Expand All @@ -393,12 +393,12 @@ describe('repository', () => {
new ecr.Repository(stack, 'Repo', { encryption: ecr.RepositoryEncryption.KMS });

// THEN
expectCDK(stack).to(haveResource('AWS::ECR::Repository',
Template.fromStack(stack).hasResourceProperties('AWS::ECR::Repository',
{
EncryptionConfiguration: {
EncryptionType: 'KMS',
},
}));
});
});

test('kms encryption with custom kms configuration', () => {
Expand All @@ -411,7 +411,7 @@ describe('repository', () => {
new ecr.Repository(stack, 'Repo', { encryptionKey: custom_key });

// THEN
expectCDK(stack).to(haveResource('AWS::ECR::Repository',
Template.fromStack(stack).hasResourceProperties('AWS::ECR::Repository',
{
EncryptionConfiguration: {
EncryptionType: 'KMS',
Expand All @@ -422,7 +422,7 @@ describe('repository', () => {
],
},
},
}));
});
});

test('fails if with custom kms key and AES256 as encryption', () => {
Expand Down

0 comments on commit 7d324aa

Please sign in to comment.