From: Hans-Christoph Steiner Date: Mon, 3 Apr 2017 21:16:39 +0000 (+0200) Subject: btlog: test with `fdroid update` without requiring ssh access X-Git-Tag: 0.8~83^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=136d58dbae5dd32e87752a2bd8a881294146293d;p=fdroidserver.git btlog: test with `fdroid update` without requiring ssh access Yay git! Just use a filesystem git remote instead of ssh. --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 652dd1fb..e26388b6 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -1408,8 +1408,9 @@ def main(): if len(repodirs) > 1: index.make(apps, sortedids, archapks, repodirs[1], True) - if config.get('binary_transparency_remote'): - btlog.make_binary_transparency_log(repodirs, git_remote=config['binary_transparency_remote']) + git_remote = config.get('binary_transparency_remote') + if git_remote or os.path.isdir(os.path.join('binary_transparency', '.git')): + btlog.make_binary_transparency_log(repodirs, git_remote=git_remote) if config['update_stats']: # Update known apks info... diff --git a/tests/run-tests b/tests/run-tests index 743cc766..d0ccf083 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -592,12 +592,15 @@ echo_header "copy tests/repo, update with binary transparency log" REPOROOT=`create_test_dir` GNUPGHOME=$REPOROOT/gnupghome KEYSTORE=$WORKSPACE/tests/keystore.jks +mkdir $REPOROOT/git_remote +cd $REPOROOT/git_remote +git init --bare cd $REPOROOT $fdroid init --keystore $KEYSTORE --repo-keyalias=sova cp -a $WORKSPACE/tests/metadata $WORKSPACE/tests/repo $WORKSPACE/tests/stats $REPOROOT/ echo 'keystorepass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI="' >> config.py echo 'keypass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI="' >> config.py -echo 'binary_transparency_remote = "git@gitlab.com:fdroid-continuous-integration/binary-transparency.git"' >> config.py +echo "binary_transparency_remote = '$REPOROOT/git_remote'" >> config.py echo "accepted_formats = ['json', 'txt', 'yml']" >> config.py $fdroid update --verbose --pretty test -e repo/index.xml @@ -606,6 +609,8 @@ test -e repo/index-v1.jar grep -F '