tests/vmcheck: handle missing /etc/yum.repos.d

It's possible to run the `vmcheck` tests against an existing VM which
may not have any existing `/etc/yum.repos.d` directory.  Since the
tests are providing their own repo files, we should be able to run
them in this uncommon configuration.

Closes: #1530
Approved by: jlebon
This commit is contained in:
Micah Abbott 2018-09-06 15:05:59 -04:00 committed by Atomic Bot
parent 961482f088
commit c9b4a8195e

View File

@ -56,6 +56,7 @@ vm_cmd ostree refs vmcheck_tmp vmcheck_remote --delete
# comes with the distro to help speed up rpm-ostree metadata fetching since we
# don't cache it (e.g. on Fedora, it takes *forever* to fetch metadata, which we
# have to do dozens of times throughout the suite)
vm_cmd mkdir -p /etc/yum.repos.d/
if ! vm_cmd test -f /etc/yum.repos.d/.vmcheck; then
echo "Neutering /etc/yum.repos.d"
# Move the current one to .bak