mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix tests, keep a special exception when we know we're checking full-domain apps
This commit is contained in:
parent
950dbc6b46
commit
1ce1ecc2be
2 changed files with 7 additions and 3 deletions
|
@ -2624,7 +2624,7 @@ def _validate_and_normalize_webpath(manifest, args_dict, app_folder):
|
||||||
and re.search(r"(ynh_webpath_register|yunohost app checkurl)", install_script_content):
|
and re.search(r"(ynh_webpath_register|yunohost app checkurl)", install_script_content):
|
||||||
|
|
||||||
domain = domain_args[0][1]
|
domain = domain_args[0][1]
|
||||||
_assert_no_conflicting_apps(domain, "/")
|
_assert_no_conflicting_apps(domain, "/", full_domain=True)
|
||||||
|
|
||||||
|
|
||||||
def _make_environment_dict(args_dict, prefix="APP_ARG_"):
|
def _make_environment_dict(args_dict, prefix="APP_ARG_"):
|
||||||
|
|
|
@ -388,7 +388,8 @@ def _get_conflicting_apps(domain, path, ignore_app=None):
|
||||||
|
|
||||||
return conflicts
|
return conflicts
|
||||||
|
|
||||||
def _assert_no_conflicting_apps(domain, path, ignore_app=None):
|
|
||||||
|
def _assert_no_conflicting_apps(domain, path, ignore_app=None, full_domain=False):
|
||||||
|
|
||||||
conflicts = _get_conflicting_apps(domain, path, ignore_app)
|
conflicts = _get_conflicting_apps(domain, path, ignore_app)
|
||||||
|
|
||||||
|
@ -402,7 +403,10 @@ def _assert_no_conflicting_apps(domain, path, ignore_app=None):
|
||||||
app_label=app_label,
|
app_label=app_label,
|
||||||
))
|
))
|
||||||
|
|
||||||
raise YunohostError('app_location_unavailable', apps="\n".join(apps))
|
if full_domain:
|
||||||
|
raise YunohostError('app_full_domain_unavailable', domain=domain)
|
||||||
|
else:
|
||||||
|
raise YunohostError('app_location_unavailable', apps="\n".join(apps))
|
||||||
|
|
||||||
|
|
||||||
def domain_url_available(domain, path):
|
def domain_url_available(domain, path):
|
||||||
|
|
Loading…
Add table
Reference in a new issue