chiark / gitweb /
tests: try `fdroid update` after adding an APK to an existing repo
authorHans-Christoph Steiner <hans@eds.org>
Fri, 30 May 2014 20:50:32 +0000 (16:50 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 5 Jun 2014 01:54:55 +0000 (21:54 -0400)
Yes, this includes a binary file, but it is only for the tests, and it is
free software since I wrote it.  The source is here:

https://github.com/eighthave/urzip

tests/run-tests
tests/urzip.apk [new file with mode: 0644]

index acf31774e216a98d3bb5478d4241dd7c5192481b..f5e60057fd1767e0b4c41c31a5cbbc168745f7de 100755 (executable)
@@ -172,6 +172,26 @@ test -e repo/index.jar
 grep -F '<application id=' repo/index.xml
 
 
+#------------------------------------------------------------------------------#
+echo_header "setup a new repo from scratch, generate a keystore, then add APK and update"
+
+REPOROOT=`create_test_dir`
+KEYSTORE=$REPOROOT/keystore.jks
+cd $REPOROOT
+$fdroid init --keystore $KEYSTORE
+test -e $KEYSTORE
+copy_apks_into_repo $REPOROOT
+$fdroid update --createmeta
+test -e repo/index.xml
+test -e repo/index.jar
+grep -F '<application id=' repo/index.xml
+cp $WORKSPACE/tests/urzip.apk $REPOROOT/
+$fdroid update --createmeta
+test -e repo/index.xml
+test -e repo/index.jar
+grep -F '<application id=' repo/index.xml
+
+
 #------------------------------------------------------------------------------#
 echo_header "setup a new repo from scratch with a HSM/smartcard"
 
diff --git a/tests/urzip.apk b/tests/urzip.apk
new file mode 100644 (file)
index 0000000..ee5e5cb
Binary files /dev/null and b/tests/urzip.apk differ