Skip to content

(integ-tests): awsApiCall Response object is too long #22059

Closed
@dontirun

Description

Describe the bug

When using assertions.awsApiCall my response object was too large and caused the integration test stack to fail deployment.

Expected Behavior

I can limit the outputPath of the api call like done here ##2825

Current Behavior

I can't limit the output and get around the 4k response limit for CloudFormation

Reproduction Steps

integ.reproduction.ts

import * as ec2 from '@aws-cdk/aws-ec2';
import { App, Stack, StackProps } from '@aws-cdk/core';
import * as integ from '@aws-cdk/integ-tests';
import { Construct } from 'constructs';
import * as redshift from '../lib';

class RedshiftEnv extends Stack {
  readonly cluster: redshift.Cluster

  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    const vpc = new ec2.Vpc(this, 'VPC');

    this.cluster = new redshift.Cluster(this, 'Cluster', {
      vpc: vpc,
      vpcSubnets: {
        subnetType: ec2.SubnetType.PUBLIC,
      },
      masterUser: {
        masterUsername: 'admin',
      },
    });
  }
}

const app = new App();
const stack = new RedshiftEnv(app, 'redshift-integ');
const test = new integ.IntegTest(app, 'LoggingBucketInteg', {
  testCases: [stack],
});

test.assertions.awsApiCall('Redshift', 'describeClusters', {
  ClusterIdentifier: stack.cluster.clusterName,
});

app.synth();

Possible Solution

Implement an outputPath feature like done here ##2825 to limit the response object

Additional Information/Context

No response

CDK CLI Version

2.41.0

Framework Version

No response

Node.js Version

v16.16.0

OS

OsX

Language

Typescript

Language Version

No response

Other information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudbugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions