mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-10 09:10:30 +03:00
deploy: remove git remotes not enabled in servergitmirrors
If the repo operator removes an item from servergitmirrors, it should auto- matically remove the remote.
This commit is contained in:
parent
5d28eec115
commit
10fa912c16
2 changed files with 23 additions and 4 deletions
|
|
@ -148,6 +148,19 @@ class ServerTest(unittest.TestCase):
|
|||
virustotal_apikey = os.getenv('VIRUSTOTAL_API_KEY')
|
||||
fdroidserver.server.upload_to_virustotal('repo', virustotal_apikey)
|
||||
|
||||
def test_remote_hostname_regex(self):
|
||||
for remote_url, name in (
|
||||
('git@github.com:guardianproject/fdroid-repo', 'github'),
|
||||
('git@gitlab.com:guardianproject/fdroid-repo', 'gitlab'),
|
||||
('https://github.com:guardianproject/fdroid-repo', 'github'),
|
||||
('https://gitlab.com/guardianproject/fdroid-repo', 'gitlab'),
|
||||
('https://salsa.debian.org/foo/repo', 'salsa'),
|
||||
):
|
||||
self.assertEqual(
|
||||
name,
|
||||
fdroidserver.server.REMOTE_HOSTNAME_REGEX.sub(r'\1', remote_url)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue