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

Add test framework to evaluate a template containing expressions #1875

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

anthony-c-martin
Copy link
Member

@anthony-c-martin anthony-c-martin commented Mar 15, 2021

I wanted to be able to use the Deployments code in our tests to evaluate ARM expressions. This allows us to go farther than saying "this looks like the correct expression to pass to ARM" and say "this generates an expression which evaluates to the expected value" in our integration tests:

  1. Tests are less brittle to the exact code being generated, and easier to review for impact.
  2. We gain better test coverage of the Deployment code, allowing us to account for unexpected edge cases.

This is just a start - it is incomplete and I expect us to improve upon it; I just wanted to lay the groundwork.

Fixes #1874

Copy link
Member

@majastrz majastrz left a comment

Choose a reason for hiding this comment

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

This is cool!

@anthony-c-martin anthony-c-martin merged commit 1bd5ffc into main Mar 16, 2021
@anthony-c-martin anthony-c-martin deleted the antmarti/experiment/eval_template branch March 16, 2021 22:54
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.

Test framework: Add the ability to partially or fully evaluate templates using actual Deployment engine code
3 participants