This PR rewrites the final section of the upgrade provider tool to use the step/v2 library. Rewriting in step/v2 has multiple benefits:
Unlike step or the tool itself, step/v2 was built with testing in mind: I have included a replay test for InformGitHub that asserts that if InformGitHub is called with the described inputs, it will call the correct set of shell commands with the correct set of arguments.
This PR rewrites the final section of the upgrade provider tool to use the
step/v2
library. Rewriting instep/v2
has multiple benefits:Unlike
step
or the tool itself,step/v2
was built with testing in mind: I have included a replay test forInformGitHub
that asserts that ifInformGitHub
is called with the described inputs, it will call the correct set of shell commands with the correct set of arguments.step/v2
is synchronous and strongly typed. Calling a step to read a file looks like this: https://github.com/pulumi/upgrade-provider/blob/da557c51f6c45f5468894c13c6aa35e684471aad/upgrade/steps.go#L699content
is then just a string. It doesn't need special handling and you can read it immediately.For a stronger description of the difference between
step
andstep/v2
, please see https://github.com/pulumi/upgrade-provider/pull/181.