pulumi / upgrade-provider

A tool to automate provider upgrades on your local machine
6 stars 1 forks source link

Add `CallWithReplay` to `step/v2` #232

Closed iwahbe closed 8 months ago

iwahbe commented 8 months ago

Add a new testing helper: CallWithReplay.

This helper calls a step/v2 function replay (identified by pipeline and name) with the arguments recorded in the replay. This makes it much less cumbersome to write and update replay based tests, since test code longer needs to include an identical copy of initial arguments.

Caveats: CallWithReplay imposes the additional requirement that the initial function inputs can be deserialized from JSON. Replay functionality already requires that inputs can be serialized to JSON, so this isn't a big stretch.