Files
opentf/internal/resources
Martin Atkins c2e619ebb9 resources: Unit tests for ManagedResourceType.PlanChanges
While working through the "walking skeleton" phase of developing the new
runtime we intentionally kept the test coverage pretty light so that it'd
be easier to make substantial changes to the design if we learned new
information as we went along.

Since we're now switching to a more incremental mode of development, it'll
be helpful to have a little more test coverage. This is a retroactive
addition of a unit test suite for the function that encapsulates the
interactions with providers for planning changes to managed resource
instances, since (FIXMEs and TODOs notwithstanding) this seems pretty
unlikely to be refactored significantly in the near future.

This establishes a very simple fake provider client implementation that's
convenient to use in the tests here. Along with just being much simpler
than the one in "package tofu" (no call tracking, etc), including this
here also avoids the need for "package resources" to depend on
"package tofu", which would therefore make it impossible for the old
runtime to call into here. As we add new code to support other
resource-related provider operations later the additional tests can
hopefully share this fake provider client implementation.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2026-04-28 11:03:35 -07:00
..