Browse Source

tests: add test for correctly handling CVC when archiving

merge-requests/701/head
Marcus Hoffmann 11 months ago
parent
commit
7f6efa74f5
2 changed files with 15 additions and 0 deletions
  1. BIN
      tests/keystore.jks
  2. +15
    -0
      tests/run-tests

BIN
tests/keystore.jks View File


+ 15
- 0
tests/run-tests View File

@ -387,6 +387,21 @@ if ! which apksigner; then
test -e archive/com.politedroid_5.apk
! test -e archive/com.politedroid_6.apk
test -e repo/com.politedroid_6.apk
echo "set an earlier version as CVC and test that it's the only one not archived"
$sed -i.tmp 's,^Current Version Code:6,Current Version Code:5,' metadata/com.politedroid.txt
$fdroid update --pretty --nosign
test `grep '<package>' archive/index.xml | wc -l` -eq 3
test `grep '<package>' repo/index.xml | wc -l` -eq 1
grep -F com.politedroid_3.apk archive/index.xml
grep -F com.politedroid_4.apk archive/index.xml
grep -F com.politedroid_5.apk repo/index.xml
grep -F com.politedroid_6.apk archive/index.xml
test -e archive/com.politedroid_3.apk
test -e archive/com.politedroid_4.apk
test -e repo/com.politedroid_5.apk
! test -e repo/com.politedroid_6.apk
test -e archive/com.politedroid_6.apk
fi

Loading…
Cancel
Save