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:
|
||||
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(
|
||||
os.path.join(get_test_apps_dir(), "hellopy_ynh"),
|
||||
args=f"domain={maindomain}&init_main_permission=visitors",
|
||||
|
@ -63,11 +68,10 @@ def teardown_module(module):
|
|||
|
||||
app_remove("hellopy")
|
||||
|
||||
if subdomain in domain_list()["domains"]:
|
||||
domain_remove(subdomain)
|
||||
if secondarydomain in domain_list()["domains"]:
|
||||
domain_remove(secondarydomain)
|
||||
|
||||
domainlist = domain_list()["domains"]
|
||||
domains = [ domain for domain in [ subdomain, secondarydomain ] if domain in domainlist ]
|
||||
for domain in domains:
|
||||
domain_remove(domain)
|
||||
|
||||
def login(session, logged_as, logged_on=None):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue