Skip to content

Commit

Permalink
chore(cli): fix integ test (#8323)
Browse files Browse the repository at this point in the history
Attempt #2 
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. ran tests locally.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
shivlaks authored Jun 2, 2020
1 parent 1199e33 commit 42bfda6
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 42bfda6

Please sign in to comment.