-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(tests): Build in source sync temp folder #6166
Merged
lucashuy
merged 5 commits into
aws:feat/build-in-source
from
lucashuy:build_in_source_sync_temp_folder
Nov 7, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3913e44
Enable and use new test data folder paths
lucashuy a62f902
Merge branch 'feat/build-in-source' of github.com:aws/aws-sam-cli int…
lucashuy 208ce0a
Added nodejs tests
lucashuy 2d626c6
Merge branch 'feat/build-in-source' into build_in_source_sync_temp_fo…
lucashuy c6600ce
Merge branch 'feat/build-in-source' into build_in_source_sync_temp_fo…
lucashuy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion
2
tests/integration/testdata/sync/code/after/nodejs_function/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
5 changes: 5 additions & 0 deletions
5
tests/integration/testdata/sync/code/after/nodejs_local_dep/local-dep/index.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,5 @@ | ||
const foo = 123; | ||
|
||
exports.exported = () => { | ||
return foo; | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/integration/testdata/sync/code/after/nodejs_local_dep/local-dep/package.json
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,8 @@ | ||
{ | ||
"name": "local-dep", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "" | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/after/nodejs_local_dep/src/index.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,10 @@ | ||
const localDep = require("local-dep"); | ||
|
||
exports.handler = async (event, context) => { | ||
return { | ||
'statusCode': 200, | ||
'body': JSON.stringify({ | ||
message: localDep.exported(), | ||
}) | ||
}; | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/after/nodejs_local_dep/src/package.json
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,10 @@ | ||
{ | ||
"name": "src", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "", | ||
"dependencies": { | ||
"local-dep": "file:../local-dep" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/integration/testdata/sync/code/before/nodejs_local_dep/src/index.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,8 @@ | ||
exports.handler = async (event, context) => { | ||
return { | ||
'statusCode': 200, | ||
'body': JSON.stringify({ | ||
message: 'no local dep', | ||
}) | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/before/nodejs_local_dep/src/package.json
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,10 @@ | ||
{ | ||
"name": "src", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "", | ||
"dependencies": { | ||
"axios": "^0.27.2" | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/before/template_nodejs_local_dep.yaml
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,10 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
|
||
Resources: | ||
PrintLocalDep: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs18.x | ||
CodeUri: nodejs_local_dep/src |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why we needed to change the import syntax here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build in source test that reuses this project is complaining about using the module import keywords. Changed it back here and ran the entire suite of integration tests on my local machine to make sure that nothing broke. We can test again using the dedicated canaries too.