Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Enable using setup-envtest without a separate CLI #2810

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Jun 29, 2024

  1. 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.
    tomasaschan committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    ecc17ab View commit details
    Browse the repository at this point in the history
  2. Fix bad gomega usage

    tomasaschan committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    645331e View commit details
    Browse the repository at this point in the history