[tests] Fix repos files handling in test_repos_sanity.sh

Related: rhbz#1828808
This commit is contained in:
Jiri Kortus 2020-05-05 14:09:19 +02:00 committed by Alexander Todorov
parent 486374eee8
commit 3ac5810d35

View File

@ -10,9 +10,9 @@ CLI="${CLI:-./src/bin/composer-cli}"
rlJournalStart rlJournalStart
rlPhaseStartSetup rlPhaseStartSetup
repodir_backup=$(mktemp -d composerrepos-XXXXX) # as opposed to RHEL-8, the system repos aren't copied over to lorax-composes repos.d,
# directory, so handling of those files was removed in RHEL-7 test (see rhbz#1830897)
composer_stop composer_stop
rlRun -t -c "mv /var/lib/lorax/composer/repos.d/* $repodir_backup"
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest "Run lorax-composer with --no-system-repos option and empty repos.d" rlPhaseStartTest "Run lorax-composer with --no-system-repos option and empty repos.d"
@ -71,8 +71,7 @@ gpgcheck=0
rlPhaseStartCleanup rlPhaseStartCleanup
$CLI compose delete $UUID $CLI compose delete $UUID
MANUAL=1 composer_stop MANUAL=1 composer_stop
rlRun -t -c "rm -rf /var/lib/lorax/composer/repos.d" rlRun -t -c "rm -rf /var/lib/lorax/composer/repos.d/*"
rlRun -t -c "mv $repodir_backup /var/lib/lorax/composer/repos.d"
composer_start composer_start
rlPhaseEnd rlPhaseEnd
rlJournalEnd rlJournalEnd