You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re-implement the setup-envtest functionality in a package
There are two main points of re-implementing vs just moving the code:
1. Error handling in the old code base was based on panicking and recovering,
where the recover basically just read out a field from the panic value and
determined the correct exit code.
In a package, we want more nuanced error handling, especially in order to
allow test suites to catch the errors and surface them through their own
reporting mechanisms.
2. There was a lot of global state in the old code base, "hidden" in the
env.Env type that was used as a receiver for all the methods.
This re-implementation tries to make the state more explicit, keeping only
dependencies (like the remote client and local store) in the environment,
while retaining the same behavior as the previous implementation.
Tests have been ported over to their respective workflow sub-packages, and
a few new ones have been added to cover cases the old test suite for one reason
or another did not. Thus, we can be fairly confident that the new implementation
does not break old functionality, even if it is a significant rewrite.
0 commit comments