Skip to content

Commit 08eea3a

Browse files
authored
Merge branch 'master' into nija-at/assertions-cleanup-bundled
2 parents a86206f + d75431b commit 08eea3a

42 files changed

Lines changed: 89 additions & 109 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/@aws-cdk/aws-stepfunctions-tasks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
},
7272
"license": "Apache-2.0",
7373
"devDependencies": {
74-
"@aws-cdk/assert-internal": "0.0.0",
74+
"@aws-cdk/assertions": "0.0.0",
7575
"@aws-cdk/aws-apigatewayv2": "0.0.0",
7676
"@aws-cdk/aws-apigatewayv2-integrations": "0.0.0",
7777
"@aws-cdk/aws-batch": "0.0.0",

packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/call-aws-service.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as sfn from '@aws-cdk/aws-stepfunctions';
33
import * as cdk from '@aws-cdk/core';
44
import * as tasks from '../../lib';
@@ -48,7 +48,7 @@ test('CallAwsService task', () => {
4848
},
4949
});
5050

51-
expect(stack).toHaveResource('AWS::IAM::Policy', {
51+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
5252
PolicyDocument: {
5353
Statement: [
5454
{
@@ -94,7 +94,7 @@ test('with custom IAM action', () => {
9494
Parameters: {},
9595
});
9696

97-
expect(stack).toHaveResource('AWS::IAM::Policy', {
97+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
9898
PolicyDocument: {
9999
Statement: [
100100
{

packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/ecs-tasks.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as ec2 from '@aws-cdk/aws-ec2';
33
import * as ecs from '@aws-cdk/aws-ecs';
44
import * as sfn from '@aws-cdk/aws-stepfunctions';
@@ -116,7 +116,7 @@ test('Running a Fargate Task', () => {
116116
Type: 'Task',
117117
});
118118

119-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
119+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
120120
PolicyDocument: {
121121
Statement: [
122122
{
@@ -223,7 +223,7 @@ test('Running an EC2 Task with bridge network', () => {
223223
Type: 'Task',
224224
});
225225

226-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
226+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
227227
PolicyDocument: {
228228
Statement: [
229229
{

packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/run-tasks.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as ec2 from '@aws-cdk/aws-ec2';
33
import * as ecs from '@aws-cdk/aws-ecs';
44
import * as sfn from '@aws-cdk/aws-stepfunctions';
@@ -196,7 +196,7 @@ test('Running a Fargate Task', () => {
196196
Type: 'Task',
197197
});
198198

199-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
199+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
200200
PolicyDocument: {
201201
Statement: [
202202
{
@@ -318,7 +318,7 @@ test('Running an EC2 Task with bridge network', () => {
318318
Type: 'Task',
319319
});
320320

321-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
321+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
322322
PolicyDocument: {
323323
Statement: [
324324
{

packages/@aws-cdk/aws-stepfunctions-tasks/test/emr/emr-add-step.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as sfn from '@aws-cdk/aws-stepfunctions';
33
import * as cdk from '@aws-cdk/core';
44
import * as tasks from '../../lib';
@@ -305,7 +305,7 @@ test('task policies are generated', () => {
305305
});
306306

307307
// THEN
308-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
308+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
309309
PolicyDocument: {
310310
Statement: [{
311311
Action: [

packages/@aws-cdk/aws-stepfunctions-tasks/test/emr/emr-cancel-step.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as sfn from '@aws-cdk/aws-stepfunctions';
33
import * as cdk from '@aws-cdk/core';
44
import * as tasks from '../../lib';
@@ -51,7 +51,7 @@ test('task policies are generated', () => {
5151
});
5252

5353
// THEN
54-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
54+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
5555
PolicyDocument: {
5656
Statement: [
5757
{

packages/@aws-cdk/aws-stepfunctions-tasks/test/emr/emr-create-cluster.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as iam from '@aws-cdk/aws-iam';
33
import * as sfn from '@aws-cdk/aws-stepfunctions';
44
import * as cdk from '@aws-cdk/core';
@@ -605,7 +605,7 @@ test('Create Cluster without Roles', () => {
605605
},
606606
});
607607

608-
expect(stack).toHaveResourceLike('AWS::IAM::Role', {
608+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', {
609609
AssumeRolePolicyDocument: {
610610
Version: '2012-10-17',
611611
Statement: [
@@ -620,7 +620,7 @@ test('Create Cluster without Roles', () => {
620620

621621
// The stack renders the ec2.amazonaws.com Service principal id with a
622622
// Join to the URLSuffix
623-
expect(stack).toHaveResourceLike('AWS::IAM::Role', {
623+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', {
624624
AssumeRolePolicyDocument: {
625625
Version: '2012-10-17',
626626
Statement: [
@@ -646,7 +646,7 @@ test('Create Cluster without Roles', () => {
646646
},
647647
});
648648

649-
expect(stack).toHaveResourceLike('AWS::IAM::Role', {
649+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Role', {
650650
AssumeRolePolicyDocument: {
651651
Version: '2012-10-17',
652652
Statement: [

packages/@aws-cdk/aws-stepfunctions-tasks/test/emr/emr-modify-instance-fleet-by-name.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as sfn from '@aws-cdk/aws-stepfunctions';
33
import * as cdk from '@aws-cdk/core';
44
import * as tasks from '../../lib';
@@ -59,7 +59,7 @@ test('task policies are generated', () => {
5959
});
6060

6161
// THEN
62-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
62+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
6363
PolicyDocument: {
6464
Statement: [
6565
{

packages/@aws-cdk/aws-stepfunctions-tasks/test/emr/emr-modify-instance-group-by-name.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as sfn from '@aws-cdk/aws-stepfunctions';
33
import * as cdk from '@aws-cdk/core';
44
import * as tasks from '../../lib';
@@ -95,7 +95,7 @@ test('task policies are generated', () => {
9595
});
9696

9797
// THEN
98-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
98+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
9999
PolicyDocument: {
100100
Statement: [
101101
{

packages/@aws-cdk/aws-stepfunctions-tasks/test/emr/emr-set-cluster-termination-protection.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as sfn from '@aws-cdk/aws-stepfunctions';
33
import * as cdk from '@aws-cdk/core';
44
import * as tasks from '../../lib';
@@ -51,7 +51,7 @@ test('task policies are generated', () => {
5151
});
5252

5353
// THEN
54-
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
54+
Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', {
5555
PolicyDocument: {
5656
Statement: [
5757
{

0 commit comments

Comments
 (0)