Skip to content

Run BMO E2E with custom IrSO and Ironic #1145

Description

@lentzi90

We currently run BMO E2E tests in this repo by cloning BMO, patching a few files, and then running the same script that would be use in BMO.
Ref: https://github.com/metal3-io/ironic-image/blob/main/hack/prepare-bmo-tests.sh.

BMO E2E was designed to be re-usable, but not in this way. The go code is the re-usable part. It can be configured/adapted with environment variables or config files.
The kustomizations for deploying IrSO and Ironic are simply what BMO needs for its own tests. The hack script for preparing and running the tests is also that. It builds BMO, loads the container image, etc. It was never meant to be used outside of BMO.

I think it is a bad idea to couple the ironic-image and baremetal-operator repositories by directly executing scripts or relying on kustomizations from the other repository. We get the same pain that we already saw in metal3-dev-env, where any change easily breaks tests across the org, and we constantly need to coordinate PRs.

Instead, we should simply build the scaffolding needed here. It will look similar but it will have a few important differences.

  1. We do not need to build the BMO container image. We are testing ironic-image, just pull the latest BMO image (stable release or main branch).
  2. We DO need to build ironic-image.
  3. We need slightly different kustomizations. Ironic should use the newly built image. Perhaps a newer version of IrSO?
  4. We could optimize what tests to run. Some tests may be of less value for ironic-image functionality than for BMO and could be skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/ciCategorizes issue or PR as related to CI or testing.triage/acceptedIndicates an issue is ready to be actively worked on.

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions