Experimental
@aws-cdk/integ-tests-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
IntegTestCaseProps Struct
Properties of an integration test case.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as integ_tests_alpha from '@aws-cdk/integ-tests-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';
import { cloud_assembly_schema } from 'aws-cdk-lib';
declare const stack: cdk.Stack;
const integTestCaseProps: integ_tests_alpha.IntegTestCaseProps = {
stacks: [stack],
// the properties below are optional
allowDeleteFailures: false,
allowDestroy: ['allowDestroy'],
assertionStack: stack,
cdkCommandOptions: {
deploy: {
args: {
all: false,
app: 'app',
assetMetadata: false,
caBundlePath: 'caBundlePath',
changeSetName: 'changeSetName',
ci: false,
color: false,
concurrency: 123,
context: {
contextKey: 'context',
},
debug: false,
ec2Creds: false,
exclusively: false,
execute: false,
force: false,
ignoreErrors: false,
json: false,
lookups: false,
notices: false,
notificationArns: ['notificationArns'],
output: 'output',
outputsFile: 'outputsFile',
parameters: {
parametersKey: 'parameters',
},
pathMetadata: false,
profile: 'profile',
proxy: 'proxy',
requireApproval: cloud_assembly_schema.RequireApproval.NEVER,
reuseAssets: ['reuseAssets'],
roleArn: 'roleArn',
rollback: false,
stacks: ['stacks'],
staging: false,
strict: false,
toolkitStackName: 'toolkitStackName',
trace: false,
usePreviousParameters: false,
verbose: false,
versionReporting: false,
},
enabled: false,
expectedMessage: 'expectedMessage',
expectError: false,
},
destroy: {
args: {
all: false,
app: 'app',
assetMetadata: false,
caBundlePath: 'caBundlePath',
color: false,
context: {
contextKey: 'context',
},
debug: false,
ec2Creds: false,
exclusively: false,
force: false,
ignoreErrors: false,
json: false,
lookups: false,
notices: false,
output: 'output',
pathMetadata: false,
profile: 'profile',
proxy: 'proxy',
roleArn: 'roleArn',
stacks: ['stacks'],
staging: false,
strict: false,
trace: false,
verbose: false,
versionReporting: false,
},
enabled: false,
expectedMessage: 'expectedMessage',
expectError: false,
},
},
diffAssets: false,
hooks: {
postDeploy: ['postDeploy'],
postDestroy: ['postDestroy'],
preDeploy: ['preDeploy'],
preDestroy: ['preDestroy'],
},
providerLogLevel: lambda.ApplicationLogLevel.INFO,
regions: ['regions'],
stackUpdateWorkflow: false,
};
Properties
allowDeleteFailuresoptionalbooleanallow_delete_failuresoptionalboolallowDeleteFailuresoptionalBooleanAllowDeleteFailuresoptionalboolAllowDeleteFailuresoptional*bool= false#When false, the test will fail if CloudFormation skips deleting a resource during a stack update. When true, only a warning is printed.
allowDestroyoptionalstring[]allow_destroyoptionaltyping.List[str]allowDestroyoptionalList<String>AllowDestroyoptionalstring[]AllowDestroyoptional*[]*string#Default: do not allow destruction of any resources on update
notes
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']
assertionStackoptionalStackassertion_stackoptionalStackassertionStackoptionalStackAssertionStackoptionalStackAssertionStackoptionalStack#Default: a stack is created for you
cdkCommandOptionsoptionalCdkCommandscdk_command_optionsoptionalCdkCommandscdkCommandOptionsoptionalCdkCommandsCdkCommandOptionsoptionalCdkCommandsCdkCommandOptionsoptionalCdkCommands#Default: runner default options
diffAssetsoptionalbooleandiff_assetsoptionalbooldiffAssetsoptionalBooleanDiffAssetsoptionalboolDiffAssetsoptional*bool= false#For example any tests involving custom resources or bundling
Default: no hooks
e.g. { postDeploy: ['yarn', 'test'] }
providerLogLeveloptionalApplicationLogLevelprovider_log_leveloptionalApplicationLogLevelproviderLogLeveloptionalApplicationLogLevelProviderLogLeveloptionalApplicationLogLevelProviderLogLeveloptionalApplicationLogLevel= ApplicationLogLevel.FATAL#regionsoptionalstring[]regionsoptionaltyping.List[str]regionsoptionalList<String>Regionsoptionalstring[]Regionsoptional*[]*string#Default: can run in any region
stackUpdateWorkflowoptionalbooleanstack_update_workflowoptionalboolstackUpdateWorkflowoptionalBooleanStackUpdateWorkflowoptionalboolStackUpdateWorkflowoptional*bool= true#