Skip to content

Commit

Permalink
chore(ecr): migrate to Assertions (#18538)
Browse files Browse the repository at this point in the history
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
madeline-k authored and pull[bot] committed Jan 20, 2022
1 parent b7ddb11 commit 8011256
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 79 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ecr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/@aws-cdk/aws-ecr/test/auth-token.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect as expectCDK, haveResourceLike } from '@aws-cdk/assert-internal';
import { Template } from '@aws-cdk/assertions';
import * as iam from '@aws-cdk/aws-iam';
import { Stack } from '@aws-cdk/core';
import { AuthorizationToken, PublicGalleryAuthorizationToken } from '../lib';
Expand All @@ -13,7 +13,7 @@ describe('auth-token', () => {
AuthorizationToken.grantRead(user);

// THEN
expectCDK(stack).to(haveResourceLike('AWS::IAM::Policy', {
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
PolicyDocument: {
Statement: [
{
Expand All @@ -23,7 +23,7 @@ describe('auth-token', () => {
},
],
},
}));
});
});

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

// THEN
expectCDK(stack).to(haveResourceLike('AWS::IAM::Policy', {
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
PolicyDocument: {
Statement: [
{
Expand All @@ -48,6 +48,6 @@ describe('auth-token', () => {
},
],
},
}));
});
});
});
Loading

0 comments on commit 8011256

Please # to comment.