-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cli): add SAM CDK integration test cases (#18875)
---- Add Integration test cases to cover the integration with SAM CLI tool. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
29 changed files
with
805 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); | ||
baseConfig.ignorePatterns.push('lib/init-templates/**/typescript/**/*.ts'); | ||
baseConfig.ignorePatterns.push('test/integ/cli/sam_cdk_integ_app/**/*.ts'); | ||
baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; | ||
module.exports = baseConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/bin/test-app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env node | ||
if (process.env.PACKAGE_LAYOUT_VERSION === '1') { | ||
var { App } = require('@aws-cdk/core'); | ||
} else { | ||
var { App } = require('aws-cdk-lib'); | ||
} | ||
var test_stack_1 = require('../lib/test-stack'); | ||
var app = new App(); | ||
const stackPrefix = process.env.STACK_NAME_PREFIX; | ||
new test_stack_1.CDKSupportDemoRootStack(app, `${stackPrefix}-TestStack`); | ||
app.synth(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"app": "node bin/test-app.js", | ||
"context": { | ||
|
||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/lib/nested-stack.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
if (process.env.PACKAGE_LAYOUT_VERSION === '1') { | ||
var { NestedStack } = require('@aws-cdk/core'); | ||
var { Function, Runtime, Code } = require('@aws-cdk/aws-lambda'); | ||
} else { | ||
var { NestedStack } = require('aws-cdk-lib'); | ||
var { Function, Runtime, Code } = require('aws-cdk-lib/aws-lambda'); | ||
} | ||
|
||
class NestedStack1 extends NestedStack { | ||
constructor(scope, id, props) { | ||
super(scope, id, props); | ||
new Function(this, 'FunctionPythonRuntime', { | ||
runtime: Runtime.PYTHON_3_7, | ||
code: Code.fromAsset('./src/python/Function'), | ||
handler: 'app.lambda_handler', | ||
}); | ||
} | ||
} | ||
exports.NestedStack1 = NestedStack1; |
Oops, something went wrong.