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

[EPIC] Cross-testing coverage for Diff #2785

Open
VenelinMartinov opened this issue Dec 24, 2024 · 0 comments
Open

[EPIC] Cross-testing coverage for Diff #2785

VenelinMartinov opened this issue Dec 24, 2024 · 0 comments
Labels
kind/engineering Work that is not visible to an external user

Comments

@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented Dec 24, 2024

We should build an extensive test-suite for previewing changes to bridged provider resources. This will allow us to have confidence in bug fixes and bigger changes to our code.

For Diff we have arrived at the pattern of cross-testing a given schema/value combination against TF - comparing the number of changes/replaces but also recording the Pulumi and TF CLI previews displayed to users. The preview/plan recordings allow us to also test the end behaviour which users see as a result of our code.

The tests are defined in terms of:

  • a "high-level" value, represented by a go value (think "my_string", []stirng{"my_string"}, etc)
  • a TF schema and a valueMaker function which turns the high-level value into a concrete value admissible by the schema which can be used in cross-tests directly.

This pattern allows us to re-use some of the logic across schemas which would otherwise not accept compatible values.

The differences in the way the SDKv2 schemas and PF schemas are defined on the TF side means that we need to test these separately.

@VenelinMartinov VenelinMartinov added the kind/engineering Work that is not visible to an external user label Dec 24, 2024
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Dec 24, 2024
@VenelinMartinov VenelinMartinov removed the needs-triage Needs attention from the triage team label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/engineering Work that is not visible to an external user
Projects
None yet
Development

No branches or pull requests

2 participants