Don't attempt to upgrade packages already in system

This commit is contained in:
Ettore Di Giacinto
2020-03-24 20:30:32 +01:00
parent d0b7552aca
commit 117554792d
3 changed files with 7 additions and 5 deletions

View File

@@ -108,13 +108,15 @@ testInstall() {
}
testUpgrade() {
luet --config $tmpdir/luet.yaml upgrade
upgrade=$(luet --config $tmpdir/luet.yaml upgrade)
installst=$?
assertEquals 'install test successfully' "$installst" "0"
assertTrue 'package uninstalled B' "[ ! -e '$tmpdir/testrootfs/test5' ]"
assertTrue 'package installed B' "[ -e '$tmpdir/testrootfs/newc' ]"
assertTrue 'package uninstalled A' "[ ! -e '$tmpdir/testrootfs/testaa' ]"
assertTrue 'package installed new A' "[ -e '$tmpdir/testrootfs/testlatest' ]"
assertNotContains 'does not contain test/c-1.0' "$upgrade" 'test/c-1.0'
assertNotContains 'does not attempt to download test/c-1.0' "$upgrade" 'test/c-1.0 downloaded'
}
# Load shUnit2.