Allow testCase stacks to use different props on the stack create and update workflows
Use Case
I have CDK constructs that utilize custom resources. This would allow me to properly test custom resources onUpdate operations by changing the properties passed to them
Proposed Solution
No response
Other Information
I can currently achieve this behavior with the following "workaround". It forces two instances of the stack to use the same stack name to achieve the update functionality
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as cdk from 'aws-cdk-lib';
import { Construct } from "constructs";
const app = new cdk.App();
interface TestStackProps extends cdk.StackProps {
someParameter: string;
}
class TestStack extends cdk.Stack {
constructor(scope: Construct, id: string, props: TestStackProps) {
super(scope, id, props);
// insert construct code here
}
}
const createStack = new TestStack(app, 'test-stack-create', {
someParameter: 'foo',
stackName:'test-stack'
});
const updateStack = new TestStack(app, 'test-stack-update', {
someParameter: 'bar',
stackName:'test-stack'
});
updateStack.addDependency(createStack);
new integ.IntegTest(app, 'integration-test', {
testCases: [createStack, updateStack],
stackUpdateWorkflow: false,
diffAssets: true,
});
Acknowledgements
[ ] I may be able to implement this feature request
Describe the feature
Allow
testCase
stacks to use different props on the stack create and update workflowsUse Case
I have CDK constructs that utilize custom resources. This would allow me to properly test custom resources
onUpdate
operations by changing the properties passed to themProposed Solution
No response
Other Information
I can currently achieve this behavior with the following "workaround". It forces two instances of the stack to use the same stack name to achieve the update functionality
Acknowledgements
CDK version used
2.143.1
Environment details (OS name and version, etc.)
N/A