mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Added tests for Gitea URLs.
This commit is contained in:
parent
5c4493ce96
commit
6f48cbc4a7
1 changed files with 11 additions and 0 deletions
|
@ -69,8 +69,19 @@ def test_repo_url_definition():
|
|||
assert _is_app_repo_url("git@github.com:YunoHost-Apps/foobar_ynh.git")
|
||||
assert _is_app_repo_url("https://git.super.host/~max/foobar_ynh")
|
||||
|
||||
### Gitea
|
||||
assert _is_app_repo_url("https://gitea.instance.tld/user/repo_ynh")
|
||||
assert _is_app_repo_url("https://gitea.instance.tld/user/repo_ynh/src/branch/branch_name")
|
||||
assert _is_app_repo_url("https://gitea.instance.tld/user/repo_ynh/src/tag/tag_name")
|
||||
assert _is_app_repo_url("https://gitea.instance.tld/user/repo_ynh/src/commit/abcd1234")
|
||||
|
||||
### Invalid patterns
|
||||
|
||||
# no schema
|
||||
assert not _is_app_repo_url("github.com/YunoHost-Apps/foobar_ynh")
|
||||
# http
|
||||
assert not _is_app_repo_url("http://github.com/YunoHost-Apps/foobar_ynh")
|
||||
# does not end in `_ynh`
|
||||
assert not _is_app_repo_url("https://github.com/YunoHost-Apps/foobar_wat")
|
||||
assert not _is_app_repo_url("https://github.com/YunoHost-Apps/foobar_ynh_wat")
|
||||
assert not _is_app_repo_url("https://github.com/YunoHost-Apps/foobar/tree/testing")
|
||||
|
|
Loading…
Add table
Reference in a new issue