Skip to content

Migrate E2E tests to use new vbmctl and clean up #3060

@lentzi90

Description

@lentzi90

With #2953 merged, we can now switch to the new CLI and remove all traces of the legacy CLI.

First, ci-e2e.sh must be updated to use the new CLI:

# Build vbmctl
make build-legacy-vbmctl
# Create VMs to act as BMHs in the tests.
./bin/vbmctl --yaml-source-file "${E2E_BMCS_CONF_FILE}"

This means also updating the BMC config files to the new format.
It is likely that we will uncover cases where the old config is entangled with the e2e tests. The goal is to clean these up. There will be some duplicated information between e2e and vbmctl, but they should not be tied together. Separate configuration files are better to avoid accidentally making things worse.
My suggestion would be to make e2e use only the e2e config. Add any needed data in there and keep the vbmctl config separate, with only the data it needs.

When ci-e2e.sh is properly migrated, remove the legacy CLI and the corresponding make target:

baremetal-operator/Makefile

Lines 223 to 225 in c70ba87

.PHONY: build-legacy-vbmctl
build-legacy-vbmctl:
cd test; go build --tags=e2e,vbmctl -ldflags $(LDFLAGS) -o $(abspath $(BIN_DIR)/vbmctl) ./vbmctl/main.go

Part of #2751

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

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions