@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.866Z") @Stability(value=Stable) public interface TestOptions extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloudassembly.schema.*;
TestOptions testOptions = TestOptions.builder()
.allowDestroy(List.of("allowDestroy"))
.cdkCommandOptions(CdkCommands.builder()
.deploy(DeployCommand.builder()
.args(DeployOptions.builder()
.all(false)
.app("app")
.assetMetadata(false)
.caBundlePath("caBundlePath")
.changeSetName("changeSetName")
.ci(false)
.color(false)
.context(Map.of(
"contextKey", "context"))
.debug(false)
.ec2Creds(false)
.exclusively(false)
.execute(false)
.force(false)
.ignoreErrors(false)
.json(false)
.lookups(false)
.notices(false)
.notificationArns(List.of("notificationArns"))
.output("output")
.outputsFile("outputsFile")
.parameters(Map.of(
"parametersKey", "parameters"))
.pathMetadata(false)
.profile("profile")
.proxy("proxy")
.requireApproval(RequireApproval.NEVER)
.reuseAssets(List.of("reuseAssets"))
.roleArn("roleArn")
.rollback(false)
.stacks(List.of("stacks"))
.staging(false)
.strict(false)
.toolkitStackName("toolkitStackName")
.trace(false)
.usePreviousParameters(false)
.verbose(false)
.versionReporting(false)
.build())
.enabled(false)
.expectedMessage("expectedMessage")
.expectError(false)
.build())
.destroy(DestroyCommand.builder()
.args(DestroyOptions.builder()
.all(false)
.app("app")
.assetMetadata(false)
.caBundlePath("caBundlePath")
.color(false)
.context(Map.of(
"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(List.of("stacks"))
.staging(false)
.strict(false)
.trace(false)
.verbose(false)
.versionReporting(false)
.build())
.enabled(false)
.expectedMessage("expectedMessage")
.expectError(false)
.build())
.build())
.diffAssets(false)
.hooks(Hooks.builder()
.postDeploy(List.of("postDeploy"))
.postDestroy(List.of("postDestroy"))
.preDeploy(List.of("preDeploy"))
.preDestroy(List.of("preDestroy"))
.build())
.regions(List.of("regions"))
.stackUpdateWorkflow(false)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
TestOptions.Builder
A builder for
TestOptions |
static class |
TestOptions.Jsii$Proxy
An implementation for
TestOptions |
| Modifier and Type | Method and Description |
|---|---|
static TestOptions.Builder |
builder() |
default List<String> |
getAllowDestroy()
List of CloudFormation resource types in this stack that can be destroyed as part of an update without failing the test.
|
default CdkCommands |
getCdkCommandOptions()
Additional options to use for each CDK command.
|
default Boolean |
getDiffAssets()
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.
|
default Hooks |
getHooks()
Additional commands to run at predefined points in the test workflow.
|
default List<String> |
getRegions()
Limit deployment to these regions.
|
default Boolean |
getStackUpdateWorkflow()
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.
|
@Stability(value=Stable) @Nullable default List<String> getAllowDestroy()
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
@Stability(value=Stable) @Nullable default CdkCommands getCdkCommandOptions()
Default: - runner default options
@Stability(value=Stable) @Nullable default Boolean getDiffAssets()
For example any tests involving custom resources or bundling
Default: false
@Stability(value=Stable) @Nullable default Hooks getHooks()
e.g. { postDeploy: ['yarn', 'test'] }
Default: - no hooks
@Stability(value=Stable) @Nullable default List<String> getRegions()
Default: - can run in any region
@Stability(value=Stable) @Nullable default Boolean getStackUpdateWorkflow()
Default: true
@Stability(value=Stable) static TestOptions.Builder builder()
TestOptions.Builder of TestOptionsCopyright © 2022. All rights reserved.