mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-12 02:00:28 +03:00
purge remnants of repo/categories.txt, which is long unused
This commit is contained in:
parent
1c3a87e002
commit
bc58959315
6 changed files with 16 additions and 33 deletions
|
|
@ -22,6 +22,7 @@ import zipfile
|
|||
import textwrap
|
||||
from datetime import datetime
|
||||
from distutils.version import LooseVersion
|
||||
from pathlib import Path
|
||||
from testcommon import TmpCwd, mkdtemp
|
||||
from unittest import mock
|
||||
|
||||
|
|
@ -1789,6 +1790,20 @@ class UpdateTest(unittest.TestCase):
|
|||
"DEBUG:root:Checking archiving for org.smssecure.smssecure - apks:0, keepversions:6, archapks:0"
|
||||
])
|
||||
|
||||
def test_categories_txt_is_removed_by_delete_unknown(self):
|
||||
"""categories.txt used to be a part of this system, now its nothing."""
|
||||
os.chdir(self.testdir)
|
||||
Path('config.yml').write_text('repo_pubkey: ffffffffffffffffffffffffffffffffffffffff')
|
||||
|
||||
categories_txt = Path('repo/categories.txt')
|
||||
categories_txt.parent.mkdir()
|
||||
categories_txt.write_text('placeholder')
|
||||
|
||||
self.assertTrue(categories_txt.exists())
|
||||
with mock.patch('sys.argv', ['fdroid update', '--delete-unknown', '--nosign']):
|
||||
fdroidserver.update.main()
|
||||
self.assertFalse(categories_txt.exists())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue