Skip to content
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

feat: support https for mock util plugin #13700

Merged
merged 10 commits into from
Apr 24, 2024
Merged

Conversation

afnx
Copy link
Contributor

@afnx afnx commented Apr 5, 2024

This PR will be make it possible to run mock server with HTTPS enabled. HTTPS support for local mock server ensures that we can accurately replicate secure environments during testing phase.

Description of changes

Added the HTTPS option to the amplify mock command. Updated Amplify Appsync Simulator to create a HTTPS server when the option is enabled.

For example, amplify mock api --https /path/to/key /path/to/cert will run a local HTTPS server.

Description of how you validated changes

Implemented additional tests.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@afnx afnx requested review from a team as code owners April 5, 2024 18:44
Copy link
Member

@sobolk sobolk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is looking good.

Please make sure that:

yarn lint-check
yarn prettier-check

are passing.

packages/amplify-appsync-simulator/src/type-definition.ts Outdated Show resolved Hide resolved
packages/amplify-cli-core/API.md Outdated Show resolved Hide resolved
packages/amplify-util-mock/src/api/api.ts Outdated Show resolved Hide resolved
packages/amplify-appsync-simulator/API.md Outdated Show resolved Hide resolved
packages/amplify-appsync-simulator/src/server/index.ts Outdated Show resolved Hide resolved
@afnx
Copy link
Contributor Author

afnx commented Apr 24, 2024

Hi @sobolk Thank you for the review. I updated the code and resolved the issues. Could you take a look?

@afnx afnx requested a review from sobolk April 24, 2024 01:16
@afnx afnx requested a review from Amplifiyer April 24, 2024 18:28
@sobolk sobolk merged commit cf418f1 into aws-amplify:dev Apr 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants