Skip to content

Conversation

Sanenelisiwe1975
Copy link

Which issue(s) does this change fix?

Why is this change necessary?

The previous test only checked method calls for coverage, not actual behavior.
This change ensures the method works as expected with a real CloudFormation template.

How does it address the issue?

Creates a temporary minimal template file.
Verifies that read_project returns a SamCliProject containing the expected stack and resource

What side effects does this change have?

No side effects; only adds a new unit test.

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.

@Sanenelisiwe1975 Sanenelisiwe1975 requested a review from a team as a code owner October 6, 2025 08:07
@github-actions github-actions bot added pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Oct 6, 2025
Copy link
Member

@roger-zhangg roger-zhangg left a comment

Choose a reason for hiding this comment

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

Thanks for contributing, the new test LGTM, could you explain why you made the change on the old test

impl = CdkIacImplementation(Mock())
impl = CfnIacImplementation(MagicMock())
impl.get_iac_file_patterns()
impl.read_project(Mock())
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to delete this


def test_cdk_implementation(self):
impl = CdkIacImplementation(Mock())
impl = CfnIacImplementation(MagicMock())
Copy link
Member

Choose a reason for hiding this comment

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

why this is changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants