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

Move the e2e tests to a standalone, self dependent go module #1946

Merged
merged 3 commits into from Jun 6, 2023

Commits on Jun 5, 2023

  1. E2ETests: remove the dependencies from metallb internal

    We make the e2etests a standalone go module, with no dependencies from
    the metallb's internal packages.
    This is done with a small amount of repetition (the packages that were
    consumed directly by metallb/internal are now copied under e2etest/pkg),
    but this is for a greater scope which is to make the e2e tests a
    standalone module dependant only from the MetalLB API.
    
    This will allow to reuse the infrastructure framework that was created
    in the testsuite also for the FRR Daemon, and at some point to move the
    e2e framework in a separated repo consumed by both.
    
    Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
    fedepaol committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    f9b12e8 View commit details
    Browse the repository at this point in the history
  2. Move the e2e tests in a separate package

    This allows to avoid polluting the metallb go.mod with unnecessary
    dependencies, and relegates the need for pinning (because of the e2e
    framework) only to the e2e go.mod
    
    On top of that, we clean the main go.mod file removing all the
    dependencies that were necessary for tests only.
    
    Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
    fedepaol committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    e25fe71 View commit details
    Browse the repository at this point in the history
  3. Add go.work to the e2etests

    The e2etests are meant to consume the local version of MetalLB. At the
    same time, they are (currently) exported as a versioned framework for
    implementing tests.
    
    Since they belong to a separate module now, the way they'd work is to
    pull the latest tagged version of the MetalLB API, which makes the
    development not practical. By adding a local go.work file, we tell the
    e2e to consume the local version of the MetalLB module (basically, the
    API which is the only remained dependency) so we can evolve MetalLB and
    the tests together without incurring in chicken - egg issues.
    
    Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
    fedepaol committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    752bca7 View commit details
    Browse the repository at this point in the history