Class IntegTestCase.Builder
java.lang.Object
software.amazon.awscdk.integtests.IntegTestCase.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<IntegTestCase>
- Enclosing class:
IntegTestCase
@Stability(Experimental)
public static final class IntegTestCase.Builder
extends Object
implements software.amazon.jsii.Builder<IntegTestCase>
(experimental) A fluent builder for
IntegTestCase
.-
Method Summary
Modifier and TypeMethodDescriptionallowDestroy
(List<String> allowDestroy) List of CloudFormation resource types in this stack that can be destroyed as part of an update without failing the test.build()
cdkCommandOptions
(CdkCommands cdkCommandOptions) Additional options to use for each CDK command.static IntegTestCase.Builder
diffAssets
(Boolean diffAssets) 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.Additional commands to run at predefined points in the test workflow.Limit deployment to these regions.(experimental) Stacks to be deployed during the test.stackUpdateWorkflow
(Boolean stackUpdateWorkflow) 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.
-
Method Details
-
create
@Stability(Experimental) public static IntegTestCase.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
IntegTestCase.Builder
.
-
allowDestroy
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']
Default: - do not allow destruction of any resources on update
- Parameters:
allowDestroy
- List of CloudFormation resource types in this stack that can be destroyed as part of an update without failing the test. This parameter is required.- Returns:
this
-
cdkCommandOptions
Additional options to use for each CDK command.Default: - runner default options
- Parameters:
cdkCommandOptions
- Additional options to use for each CDK command. This parameter is required.- Returns:
this
-
diffAssets
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
Default: false
- Parameters:
diffAssets
- 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. This parameter is required.- Returns:
this
-
hooks
Additional commands to run at predefined points in the test workflow.e.g. { postDeploy: ['yarn', 'test'] }
Default: - no hooks
- Parameters:
hooks
- Additional commands to run at predefined points in the test workflow. This parameter is required.- Returns:
this
-
regions
Limit deployment to these regions.Default: - can run in any region
- Parameters:
regions
- Limit deployment to these regions. This parameter is required.- Returns:
this
-
stackUpdateWorkflow
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.Default: true
- Parameters:
stackUpdateWorkflow
- 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. This parameter is required.- Returns:
this
-
stacks
(experimental) Stacks to be deployed during the test.- Parameters:
stacks
- Stacks to be deployed during the test. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<IntegTestCase>
- Returns:
- a newly built instance of
IntegTestCase
.
-