mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Ensure secondarydomain/subdomain are configured, only list once
This commit is contained in:
parent
b457e78ace
commit
3f070edb61
1 changed files with 9 additions and 5 deletions
|
@ -49,6 +49,11 @@ def setup_module(module):
|
||||||
if "bob" not in userlist:
|
if "bob" not in userlist:
|
||||||
user_create("bob", maindomain, dummy_password, fullname="Bob Marley")
|
user_create("bob", maindomain, dummy_password, fullname="Bob Marley")
|
||||||
|
|
||||||
|
domainlist = domain_list()["domains"]
|
||||||
|
domains = [ domain for domain in [ subdomain, secondarydomain ] if domain not in domainlist ]
|
||||||
|
for domain in domains:
|
||||||
|
domain_add(domain)
|
||||||
|
|
||||||
app_install(
|
app_install(
|
||||||
os.path.join(get_test_apps_dir(), "hellopy_ynh"),
|
os.path.join(get_test_apps_dir(), "hellopy_ynh"),
|
||||||
args=f"domain={maindomain}&init_main_permission=visitors",
|
args=f"domain={maindomain}&init_main_permission=visitors",
|
||||||
|
@ -63,11 +68,10 @@ def teardown_module(module):
|
||||||
|
|
||||||
app_remove("hellopy")
|
app_remove("hellopy")
|
||||||
|
|
||||||
if subdomain in domain_list()["domains"]:
|
domainlist = domain_list()["domains"]
|
||||||
domain_remove(subdomain)
|
domains = [ domain for domain in [ subdomain, secondarydomain ] if domain in domainlist ]
|
||||||
if secondarydomain in domain_list()["domains"]:
|
for domain in domains:
|
||||||
domain_remove(secondarydomain)
|
domain_remove(domain)
|
||||||
|
|
||||||
|
|
||||||
def login(session, logged_as, logged_on=None):
|
def login(session, logged_as, logged_on=None):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue