You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `sam init` integration tests took an
average of 7 minutes to complete. This commit
reduces them to an average of 2 minutes 30 seconds.
Problem:
The current sam cli implementation clones the entire template repo each
call of sam.test.ts#createSamApplication(). This function is called more
than it needs to be for the same test coverage.
Solution:
Remove redundant calls to the createSamApplication() method. Test
a certain scenario only once because it does not change for each
iteration of SAM project type.
Note:
I looked in to the `sam init --location` flag and it doesn't assist in
trying to test the current logic this test aims to validate. Use of
`--location` is a different way to do do a `sam init`, but we are only
testing Scenario 1 "Initializes a new SAM project with required parameters passed as parameters":
//Scenario 1
$ sam init --runtime python3.7 --dependency-manager pip --app-template hello-world --name sam-app
// Scenario 2
$ sam init --location /path/to/template/folder
ref: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-init.htmlfix#2090
Signed-off-by: Nikolas Komonen <[email protected]>
0 commit comments