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.
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.