Skip to content

Commit

Permalink
chore(cli): fix diff integ test to use pseudo parameter
Browse files Browse the repository at this point in the history
our diff command represents the URLSuffix (typically amazonaws.com)
by using the CloudFormation pseudo-parameter.

modifies the principal in the test to expect it instead
  • Loading branch information
shivlaks committed Jun 2, 2020
1 parent d0fa843 commit 3f1d162
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/aws-cdk/test/integ/cli/cli.integtest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,15 @@ test('IAM diff', async () => {

// Roughly check for a table like this:
//
// ┌───┬─────────────────┬────────┬────────────────┬────────────────────────────┬───────────┐
// │ │ Resource │ Effect │ Action │ Principal │ Condition │
// ├───┼─────────────────┼────────┼────────────────┼────────────────────────────┼───────────┤
// │ + │ ${SomeRole.Arn} │ Allow │ sts:AssumeRole │ Service:ec2.amazonaws.com │ │
// └───┴─────────────────┴────────┴────────────────┴────────────────────────────┴───────────┘
// ┌───┬─────────────────┬────────┬────────────────┬────────────────────────────-──┬───────────┐
// │ │ Resource │ Effect │ Action │ Principal │ Condition │
// ├───┼─────────────────┼────────┼────────────────┼───────────────────────────────┼───────────┤
// │ + │ ${SomeRole.Arn} │ Allow │ sts:AssumeRole │ Service:ec2.${AWS::URLSuffix} │ │
// └───┴─────────────────┴────────┴────────────────┴───────────────────────────────┴───────────┘

expect(output).toContain('${SomeRole.Arn}');
expect(output).toContain('sts:AssumeRole');
expect(output).toContain('ec2.amazonaws.com');
expect(output).toContain('ec2.${AWS::URLSuffix}');
});

test('fast deploy', async () => {
Expand Down

0 comments on commit 3f1d162

Please sign in to comment.