-
Notifications
You must be signed in to change notification settings - Fork 821
feat(gen2-migration): amplify-migration-system executes e2e flow for amplify init, using atmosphere credentials or local profile #14432
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
base: gen2-migration
Are you sure you want to change the base?
Conversation
90354e5 to
1f9b29d
Compare
85c1a83 to
7efef77
Compare
7efef77 to
4b26f42
Compare
b93919f to
da4c3ca
Compare
|
Rename to amplify-migration-e2e-system |
|
Rename package.json task dev -> migrate |
|
Don't use require(), use import instead. clean up all mocks using jest resetAllMocks |
|
Add necessary logs from nexpect to dumpfile |
|
deleteAmplifyApp should wait until resources are deleted. poll until root stack is gone. aws sdk, import sdk cloudformation client called waitforstackstatus, deleted. |
|
default to |
|
directory manager integration test doesn't need to be named integration test. only if it does a network call. |
|
make the suffix of the deployed app names similar to the amplify-migration-apps name |
|
Remove verify-app validation. |
|
Remove validations from list-apps |
|
some apps are not neccesarily react, parameterize this. |
|
make profile argument required. |
|
for atmosphere flow, create a profile with session token, config and credentials files |
|
remove multi-app deployment functionality, make it take a single app. |
packages/amplify-migration-e2e-system/src/__tests__/amplify-initializer.test.ts
Fixed
Show fixed
Hide fixed
packages/amplify-migration-e2e-system/src/__tests__/amplify-initializer.test.ts
Fixed
Show fixed
Hide fixed
This is now configurable in |
1680e87 to
56a4e2f
Compare
Made it required. Either --profile or --atmosphere must be indicated. |
9ec3f41 to
147cb3c
Compare
| .wait('Select the authentication method you want to use:') | ||
| .sendCarriageReturn() | ||
| .wait('Please choose the profile you want to use') | ||
| .sendLine(s.profileName); |
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.
This was as bug in the original code, that was unused. Sending profile name in this way did not select the expected profile, as it is not a typed input. It is only a selection via up/down arrow keys.
| return chain(context); | ||
| }, | ||
| sendKeyDown(repeat?: number): ExecutionContext { | ||
| const repetitions = repeat ? Math.max(1, repeat) : 1; |
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.
Originally, the repeat parameter would lead to the following behavior:
- When 0, send key down 1 time
- When 1, send key down 1 time
- When -1, send key down 1 time
This has been changed such that the number of times we "send key down" corresponds to the number of the param. It errors on 0 or less.
| return chain(context); | ||
| }, | ||
| sendKeyUp(repeat?: number): ExecutionContext { | ||
| const repetitions = repeat ? Math.max(1, repeat) : 1; |
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.
Similar situation to sendKeyDown.
Description of changes
This is a CLI. See log example at the end.
Set up configurations for each sample app and configuration loaders. Introduce classes that can execute Amplify deployments either locally or to Atmosphere.
If using Atmosphere, you must have a .gamma.env file with properly configured variables according to the README.
If not, the migration system will pull from your default profile named [default] to deploy Amplify apps, unless you specify --profile.
About 40% of this change is tests.
Description of how you validated changes
Unit tests.
Used atmosphere endpoint to run integration and e2e tests that run
amplify init. Deployed amplify apps using this CLI to my personal dev account using profiles under different names, and also the default profile on my system.Next steps
Checklist
yarn testpassesLog example
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.