Skip to content

Commit

Permalink
Merge branch 'master' into bump-cfnspec/v53.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 20, 2022
2 parents 505ca9a + 7947e07 commit b11fb5a
Show file tree
Hide file tree
Showing 11 changed files with 194 additions and 161 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codecommit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert-internal": "0.0.0",
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/aws-sns": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cdk-integ-tools": "0.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-codecommit/test/codecommit.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '@aws-cdk/assert-internal/jest';
import { join, resolve } from 'path';
import { Template } from '@aws-cdk/assertions';
import { Role, ServicePrincipal } from '@aws-cdk/aws-iam';
import { Asset } from '@aws-cdk/aws-s3-assets';
import * as cxschema from '@aws-cdk/cloud-assembly-schema';
Expand All @@ -19,7 +19,7 @@ describe('codecommit', () => {

new Repository(stack, 'MyRepository', props).notify(snsArn);

expect(stack).toMatchTemplate({
Template.fromStack(stack).templateMatches({
Resources: {
MyRepository4C4BD5FC: {
Type: 'AWS::CodeCommit::Repository',
Expand Down Expand Up @@ -258,7 +258,7 @@ describe('codecommit', () => {
repository.grantPullPush(role);

// THEN
expect(stack).toHaveResource('AWS::IAM::Policy', {
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
PolicyDocument: {
Statement: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import { Template } from '@aws-cdk/assertions';
import * as sns from '@aws-cdk/aws-sns';
import * as cdk from '@aws-cdk/core';
import * as codecommit from '../lib';
Expand All @@ -16,7 +16,7 @@ describe('notification rule', () => {

repository.notifyOnPullRequestMerged('NotifyOnPullRequestMerged', target);

expect(stack).toHaveResource('AWS::CodeStarNotifications::NotificationRule', {
Template.fromStack(stack).hasResourceProperties('AWS::CodeStarNotifications::NotificationRule', {
Name: 'MyCodecommitRepositoryNotifyOnPullRequestCreatedBB14EA32',
DetailType: 'FULL',
EventTypeIds: [
Expand All @@ -38,7 +38,7 @@ describe('notification rule', () => {
],
});

expect(stack).toHaveResource('AWS::CodeStarNotifications::NotificationRule', {
Template.fromStack(stack).hasResourceProperties('AWS::CodeStarNotifications::NotificationRule', {
Name: 'MyCodecommitRepositoryNotifyOnPullRequestMerged34A7EDF1',
DetailType: 'FULL',
EventTypeIds: [
Expand Down
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 b11fb5a

Please sign in to comment.