Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix installation of local build (#1004)
The integration tests looks to have "forgotten/unused" feature to build convert2rhel at the beginning of test and install it instead of using COPR build. This is useful when developing a test along with feature/code change without a need to open a PR to have a build produced by Packit - it's faster iteration. It is used when the following environmental args are used in tmt run: - `ANSIBLE_BUILD_RPM=build` - `ANSIBLE_RPM_PROVIDER=local` It was broken in following ways: - the previous usage was `ANSIBLE_BUILD_RPM=true` the code expected the `true` value as boolean, resp. there was a mismatch of types and the condition was not evaluated as expected. This patch is changing it to expect a "build" string to avoid this problem, i.e. to not use "truthy" values. - `scripts/extract_version_from_rpm_spec.py` script which is used to figure out what is the version-release part of rpm name did not support a version with 3 parts, e.g. the current `1.5.0` and thus it did not return the `name` part. This patch adds support for additional "." + "number". - the Ansible play to copy built rpms to provisioned host supported only "docker" and "virtual" providers of tmt. The "virtual" part was generalized into "non-docker" to support other types and assuming that they have SSH support. With this, the integration tests can be executed e.g. the following way: ``` $ tmt \ --context distro=centos-7 \ run \ -vvv --all \ -e ANSIBLE_BUILD_RPM=build \ -e ANSIBLE_RPM_PROVIDER=local \ provision \ --how virtual \ --image https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 \ plan \ --name $TEST_PLAN_NAME ``` Signed-off-by: Petr Vobornik <[email protected]>
- Loading branch information