We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82bd3f5 commit 7f2bc24Copy full SHA for 7f2bc24
packages/aws-cdk/test/integ/cli/app/app.js
100644
100755
@@ -308,6 +308,19 @@ class ConditionalResourceStack extends cdk.Stack {
308
}
309
310
311
+class BundlingStage extends cdk.Stage {
312
+ constructor(parent, id, props) {
313
+ super(parent, id, props);
314
+ const stack = new cdk.Stack(this, 'BundlingStack');
315
+
316
+ new lambda.Function(stack, 'Handler', {
317
+ code: lambda.Code.fromAsset(path.join(__dirname, 'lambda')),
318
+ handler: 'index.handler',
319
+ runtime: lambda.Runtime.NODEJS_16_X,
320
+ });
321
+ }
322
+}
323
324
class SomeStage extends cdk.Stage {
325
constructor(parent, id, props) {
326
super(parent, id, props);
@@ -392,6 +405,8 @@ switch (stackSet) {
392
405
new BuiltinLambdaStack(app, `${stackPrefix}-builtin-lambda-function`);
393
406
394
407
new ImportableStack(app, `${stackPrefix}-importable-stack`);
408
409
+ new BundlingStage(app, `${stackPrefix}-bundling-stage`);
395
410
break;
396
411
397
412
case 'stage-using-context':
packages/aws-cdk/test/integ/cli/cli.integtest.ts
@@ -61,6 +61,13 @@ integTest('Construct with builtin Lambda function', withDefaultFixture(async (fi
61
await fixture.cdkDestroy('builtin-lambda-function');
62
}));
63
64
+// this is to ensure that asset bundling for apps under a stage does not break
65
+integTest('Stage with bundled Lambda function', withDefaultFixture(async (fixture) => {
66
+ await fixture.cdkDeploy('bundling-stage/BundlingStack');
67
+ fixture.log('Setup complete!');
68
+ await fixture.cdkDestroy('bundling-stage/BundlingStack');
69
+}));
70
71
integTest('Two ways of showing the version', withDefaultFixture(async (fixture) => {
72
const version1 = await fixture.cdk(['version'], { verbose: false });
73
const version2 = await fixture.cdk(['--version'], { verbose: false });
0 commit comments