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

Fix tests to not depend on changeable value #3842

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

hawflau
Copy link
Contributor

@hawflau hawflau commented Apr 27, 2022

Which issue(s) does this change fix?

Why is this change necessary?

The test originally tested against the value set in samcli/runtime_config.json. However, since merging PR #3838, the value can change from time to time. This PR fixes the test and improves coverage.

How does it address the issue?

mock config.get to return a fake value for testing. Also add test to test samcli/runtime_config.json is read properly.

What side effects does this change have?

No

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

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

@hawflau hawflau merged commit 0576186 into aws:develop Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants