-
Notifications
You must be signed in to change notification settings - Fork 103
add new e2e test for validating backwards compatibility of amplify outputs #2009
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
Conversation
🦋 Changeset detectedLatest commit: 07c7501 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/integration-tests/src/test-e2e/amplify_outputs_backwards_compatibility.test.ts
Outdated
Show resolved
Hide resolved
packages/integration-tests/src/test-e2e/amplify_outputs_backwards_compatibility.test.ts
Outdated
Show resolved
Hide resolved
| await currentNpmProxyController.tearDown(); | ||
| await baselineNpmProxyController.setUp(); | ||
| await reinstallDependencies(); | ||
| await execa( |
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.
Should we also add code that calls generateClientConfig<> with all known versions ?
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.
Added
sobolk
left a comment
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.
Btw. Looks good overall.
| try { | ||
| assert.ok( | ||
| await generateClientConfig(branchBackendIdentifier, '1'), | ||
| `outputs v1 failed to be generated for an app created with ${type} library version` | ||
| ); | ||
| } catch (e) { | ||
| throw new Error( | ||
| `outputs v1 failed to be generated for an app created with ${type} library version. Error: ${JSON.stringify( | ||
| e | ||
| )}` | ||
| ); |
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.
do we need these try-catch blocks ?
would assert.doesNotReject() work 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.
it will, but the error messages were a bit cryptic. This way we can add more assertions on the result of the API as well in the future.
Problem
We currently don't have tests to validate that changes in amplify outputs versioning will not break apps built with older versions.
Issue number, if available:
Changes
add new e2e test for validating backwards compatibility of amplify outputs.
Corresponding docs PR, if applicable:
Validation
Checklist
run-e2elabel set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.