@aws-cdk-testing/cli-integ
Version:
Integration tests for the AWS CDK CLI
29 lines (23 loc) • 1.03 kB
text/typescript
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
import { integTest, withoutBootstrap } from '../../lib';
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
integTest('can add tags then update tags during re-bootstrap', withoutBootstrap(async (fixture) => {
const bootstrapStackName = fixture.bootstrapStackName;
await fixture.cdkBootstrapModern({
verbose: true,
toolkitStackName: bootstrapStackName,
tags: 'Foo=Bar',
cfnExecutionPolicy: 'arn:aws:iam::aws:policy/AdministratorAccess',
});
await fixture.cdkBootstrapModern({
verbose: true,
toolkitStackName: bootstrapStackName,
tags: 'Foo=BarBaz',
cfnExecutionPolicy: 'arn:aws:iam::aws:policy/AdministratorAccess',
force: true,
});
const response = await fixture.aws.cloudFormation.send(new DescribeStacksCommand({ StackName: bootstrapStackName }));
expect(response.Stacks?.[0].Tags).toEqual([
{ Key: 'Foo', Value: 'BarBaz' },
]);
}));