From 2448f070e9a9e88f048370d82e4acc761f308ab2 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 23 May 2022 15:25:05 +0200 Subject: [PATCH] fix tests and docstring error --- fdroidserver/deploy.py | 2 +- tests/deploy.TestCase | 32 ++++++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/fdroidserver/deploy.py b/fdroidserver/deploy.py index 318250b4..953c6f71 100644 --- a/fdroidserver/deploy.py +++ b/fdroidserver/deploy.py @@ -47,7 +47,7 @@ REMOTE_HOSTNAME_REGEX = re.compile(r'\W*\w+\W+(\w+).*') def _get_index_excludes(repo_section): - """The list of files to be synced last, since they finalize the deploy. + """Return the list of files to be synced last, since they finalize the deploy. The process of pushing all the new packages to the various services can take a while. So the index files should be updated diff --git a/tests/deploy.TestCase b/tests/deploy.TestCase index f493d7ea..046dcc2b 100755 --- a/tests/deploy.TestCase +++ b/tests/deploy.TestCase @@ -57,15 +57,27 @@ class DeployTest(unittest.TestCase): '--safe-links', '--quiet', '--exclude', - 'repo/index.xml', + 'repo/entry.jar', '--exclude', - 'repo/index.jar', + 'repo/entry.json', + '--exclude', + 'repo/entry.json.asc', '--exclude', 'repo/index-v1.jar', '--exclude', 'repo/index-v1.json', '--exclude', 'repo/index-v1.json.asc', + '--exclude', + 'repo/index-v2.jar', + '--exclude', + 'repo/index-v2.json', + '--exclude', + 'repo/index-v2.json.asc', + '--exclude', + 'repo/index.jar', + '--exclude', + 'repo/index.xml', 'repo', 'example.com:/var/www/fdroid', ], @@ -142,15 +154,27 @@ class DeployTest(unittest.TestCase): 'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ' + fdroidserver.deploy.config['identity_file'], '--exclude', - 'archive/index.xml', + 'archive/entry.jar', '--exclude', - 'archive/index.jar', + 'archive/entry.json', + '--exclude', + 'archive/entry.json.asc', '--exclude', 'archive/index-v1.jar', '--exclude', 'archive/index-v1.json', '--exclude', 'archive/index-v1.json.asc', + '--exclude', + 'archive/index-v2.jar', + '--exclude', + 'archive/index-v2.json', + '--exclude', + 'archive/index-v2.json.asc', + '--exclude', + 'archive/index.jar', + '--exclude', + 'archive/index.xml', 'archive', serverwebroot, ],