Fix E2E tests, simplify GetAtt logic for revert, clean up README file contents#14189
Fix E2E tests, simplify GetAtt logic for revert, clean up README file contents#14189abhi7cr merged 4 commits intomigrationsfrom
Conversation
| const gen2Region = gen2Meta.auth.aws_region; | ||
| const gen2Resource = await getResourceDetails('AWS::Cognito::UserPool', gen2UserPoolId, gen2Region); | ||
| console.log(gen1Resource, gen2Resource); | ||
| gen1Resource.UserPoolName = extractUserPoolNamePrefix(gen1Resource.UserPoolName); |
There was a problem hiding this comment.
sandbox environment will have different user pool names compared to the gen1 environment name
| const gen1ClientIdWeb = gen1ClientIds[0]; | ||
| const gen1ResourceIds = [gen1UserPoolId, gen1IdentityPoolId, gen1ClientIdWeb]; | ||
|
|
||
| const gen1ResourceDetails = await Promise.all([ |
There was a problem hiding this comment.
removing CloudControl API checks since we are querying for the same resource.
| // Assert | ||
| await assertExecuteCommand(projRoot, CATEGORIES_TO_MOVE); | ||
|
|
||
| runRevertCommand(projRoot, gen1StackName, gen2StackName); |
There was a problem hiding this comment.
TODO: add assertion post revert once the GetAtt removal changes are released in the next tagged release.
| await assertDefaultGen1Setup(projRoot); | ||
| runCodegenCommand(projRoot); | ||
| copyFunctionFile(projRoot, 'function', gen1FunctionName); | ||
| copyGen1Schema(projRoot, projName); |
There was a problem hiding this comment.
This was needed to be done manually at the time when tests were written. Discussed offline with @abhi7cr , this is been handled as part of the codegen now.
| socialProvider = 'APPLE_PRIVATE_KEY_2'; | ||
| } | ||
| process.env[socialProvider] = process.env[socialProvider] ?? value; | ||
| }); |
There was a problem hiding this comment.
I believe initially when I wrote this test, I did not consider this case if the variables are not defined locally. It is good to have this here for both cases, tests run locally or in the CI/CD flow in CodeBuild.
Description of changes
GetAttlogic for revert in template generator. We have movedGetAttlogic tocfn-output-resolver.ts. This was causingrevertto fail forauthcategory.npx sandboxinstruction as we want customers to use CI/CD for refactor.Description of how you validated changes
unit tests, E2E tests, manual testing of commands
Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.