Skip to content

Conversation

GavinZZ
Copy link
Contributor

@GavinZZ GavinZZ commented Oct 18, 2022

Issue #, if available

Description of changes

Added a script to allow easier transform tests creation.

Description of how you validated changes

Verified by manual trigger.

Tested with and without --disable-api-configuration, work as expected.
Tested with arn:aws..., work as expected.

Not affecting SAM T functionality.

@GavinZZ GavinZZ changed the title Add transform test script chore: Add transform test script Oct 18, 2022
@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 18, 2022
@GavinZZ GavinZZ changed the title chore: Add transform test script chore: Add transform test creation script Oct 18, 2022
@GavinZZ GavinZZ requested a review from hoffa October 18, 2022 19:09
Remove unused import

Address Feedback

Format file

Run sam-translate as a script

Use main

Address Feedback
@GavinZZ GavinZZ force-pushed the add_transform_test_script branch from 7677734 to e6dfce3 Compare October 18, 2022 19:49
Co-authored-by: Chris Rehn <1280602+hoffa@users.noreply.github.com>
Copy link
Contributor

@hoffa hoffa left a comment

Choose a reason for hiding this comment

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

:shipit:

Co-authored-by: Chris Rehn <1280602+hoffa@users.noreply.github.com>
Co-authored-by: Chris Rehn <1280602+hoffa@users.noreply.github.com>
@xazhao
Copy link
Contributor

xazhao commented Oct 18, 2022

A general question: If we use the script to create transform tests, we use translated templates to compare with translated templates which will for sure succeed. Are we supposed to write output templates on ourselves so we can make sure it's expected?

On the other hand, if it is to test if Sam-T functionality has changed, I think this method makes sense.

@hoffa
Copy link
Contributor

hoffa commented Oct 18, 2022

A general question: If we use the script to create transform tests, we use translated templates to compare with translated templates which will for sure succeed. Are we supposed to write output templates on ourselves so we can make sure it's expected?

On the other hand, if it is to test if Sam-T functionality has changed, I think this method makes sense.

We should always verify the output is as we expect. The tool only makes the step of generating it easier.

@GavinZZ
Copy link
Contributor Author

GavinZZ commented Oct 18, 2022

To answer Xia's question, I think this script just makes our live easier. We will still need to manually verify the output to make sure it's what we expect.

@xazhao
Copy link
Contributor

xazhao commented Oct 18, 2022

Oh makes sense to me then! Could we add this to development guide too?

@GavinZZ
Copy link
Contributor Author

GavinZZ commented Oct 18, 2022

Will add a message at the end to let users to check output manually.

@GavinZZ GavinZZ merged commit c3db07f into develop Oct 18, 2022
@aahung aahung deleted the add_transform_test_script branch November 17, 2022 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants