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 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

      @Stability(Stable) public IntegTestCase.Builder allowDestroy(List<String> 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

      @Stability(Stable) public IntegTestCase.Builder cdkCommandOptions(CdkCommands 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

      @Stability(Stable) public 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.

      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

      @Stability(Stable) public IntegTestCase.Builder hooks(Hooks 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

      @Stability(Stable) public IntegTestCase.Builder regions(List<String> 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

      @Stability(Stable) public IntegTestCase.Builder 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.

      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

      @Stability(Experimental) public IntegTestCase.Builder stacks(List<? extends Stack> 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

      @Stability(Experimental) public IntegTestCase build()
      Specified by:
      build in interface software.amazon.jsii.Builder<IntegTestCase>
      Returns:
      a newly built instance of IntegTestCase.