@aws-cdk_integ-tests-alpha.IntegTestProps

interface IntegTestProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.IntegTests.Alpha.IntegTestProps
Gogithub.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2#IntegTestProps
Javasoftware.amazon.awscdk.integtests.alpha.IntegTestProps
Pythonaws_cdk.integ_tests_alpha.IntegTestProps
TypeScript (source)@aws-cdk/integ-tests-alpha ยป IntegTestProps

Integration test properties.

Example

declare const myCustomResource: CustomResource;
declare const stack: Stack;
declare const app: App;

const integ = new IntegTest(app, 'Integ', { testCases: [stack] });
integ.assertions.expect(
  'CustomAssertion',
  ExpectedResult.objectLike({ foo: 'bar' }),
  ActualResult.fromCustomResource(myCustomResource, 'data'),
);

Properties

NameTypeDescription
testCases๐Ÿ”นStack[]List of test cases that make up this test.
allowDestroy?๐Ÿ”นstring[]List of CloudFormation resource types in this stack that can be destroyed as part of an update without failing the test.
assertionStack?๐Ÿ”นStackSpecify a stack to use for assertions.
cdkCommandOptions?๐Ÿ”นCdkCommandsAdditional options to use for each CDK command.
diffAssets?๐Ÿ”นbooleanWhether or not to include asset hashes in the diff Asset hashes can introduces a lot of unneccessary noise into tests, but there are some cases where asset hashes should be included.
enableLookups?๐Ÿ”นbooleanEnable lookups for this test.
hooks?๐Ÿ”นHooksAdditional commands to run at predefined points in the test workflow.
regions?๐Ÿ”นstring[]Limit deployment to these regions.
stackUpdateWorkflow?๐Ÿ”นbooleanRun update workflow on this test case This should only be set to false to test scenarios that are not possible to test as part of the update workflow.

testCases๐Ÿ”น

Type: Stack[]

List of test cases that make up this test.


allowDestroy?๐Ÿ”น

Type: string[] (optional, default: do not allow destruction of any resources on update)

List of CloudFormation resource types in this stack that can be destroyed as part of an update without failing the test.

This list should only include resources that for this specific integration test we are sure will not cause errors or an outage if destroyed. For example, maybe we know that a new resource will be created first before the old resource is destroyed which prevents any outage.

e.g. ['AWS::IAM::Role']


assertionStack?๐Ÿ”น

Type: Stack (optional, default: a stack is created for you)

Specify a stack to use for assertions.


cdkCommandOptions?๐Ÿ”น

Type: CdkCommands (optional, default: runner default options)

Additional options to use for each CDK command.


diffAssets?๐Ÿ”น

Type: boolean (optional, default: false)

Whether or not to include asset hashes in the diff Asset hashes can introduces a lot of unneccessary noise into tests, but there are some cases where asset hashes should be included.

For example any tests involving custom resources or bundling


enableLookups?๐Ÿ”น

Type: boolean (optional, default: false)

Enable lookups for this test.

If lookups are enabled then stackUpdateWorkflow must be set to false. Lookups should only be enabled when you are explicitly testing lookups.


hooks?๐Ÿ”น

Type: Hooks (optional, default: no hooks)

Additional commands to run at predefined points in the test workflow.

e.g. { postDeploy: ['yarn', 'test'] }


regions?๐Ÿ”น

Type: string[] (optional, default: can run in any region)

Limit deployment to these regions.


stackUpdateWorkflow?๐Ÿ”น

Type: boolean (optional, default: true)

Run update workflow on this test case This should only be set to false to test scenarios that are not possible to test as part of the update workflow.