Skip to content

Commit 4764f5b

Browse files
authored
chore(ecr): migrate to Assertions (#18538)
---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a2e8914 commit 4764f5b

File tree

3 files changed

+112
-79
lines changed

3 files changed

+112
-79
lines changed

packages/@aws-cdk/aws-ecr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
},
8484
"license": "Apache-2.0",
8585
"devDependencies": {
86-
"@aws-cdk/assert-internal": "0.0.0",
86+
"@aws-cdk/assertions": "0.0.0",
8787
"@aws-cdk/cdk-build-tools": "0.0.0",
8888
"@aws-cdk/cdk-integ-tools": "0.0.0",
8989
"@aws-cdk/cfn2ts": "0.0.0",

packages/@aws-cdk/aws-ecr/test/auth-token.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect as expectCDK, haveResourceLike } from '@aws-cdk/assert-internal';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as iam from '@aws-cdk/aws-iam';
33
import { Stack } from '@aws-cdk/core';
44
import { AuthorizationToken, PublicGalleryAuthorizationToken } from '../lib';
@@ -13,7 +13,7 @@ describe('auth-token', () => {
1313
AuthorizationToken.grantRead(user);
1414

1515
// THEN
16-
expectCDK(stack).to(haveResourceLike('AWS::IAM::Policy', {
16+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
1717
PolicyDocument: {
1818
Statement: [
1919
{
@@ -23,7 +23,7 @@ describe('auth-token', () => {
2323
},
2424
],
2525
},
26-
}));
26+
});
2727
});
2828

2929
test('PublicGalleryAuthorizationToken.grantRead()', () => {
@@ -35,7 +35,7 @@ describe('auth-token', () => {
3535
PublicGalleryAuthorizationToken.grantRead(user);
3636

3737
// THEN
38-
expectCDK(stack).to(haveResourceLike('AWS::IAM::Policy', {
38+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
3939
PolicyDocument: {
4040
Statement: [
4141
{
@@ -48,6 +48,6 @@ describe('auth-token', () => {
4848
},
4949
],
5050
},
51-
}));
51+
});
5252
});
5353
});

0 commit comments

Comments
 (0)