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.
- 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).
- We DO need to build ironic-image.
- We need slightly different kustomizations. Ironic should use the newly built image. Perhaps a newer version of IrSO?
- 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.
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.