mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
curl tests: be able to use __DOMAIN__ in the base url
This commit is contained in:
parent
0739f61fed
commit
831d869e64
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ USER = os.environ["USER"]
|
||||||
PASSWORD = os.environ["PASSWORD"]
|
PASSWORD = os.environ["PASSWORD"]
|
||||||
LXC_IP = os.environ["LXC_IP"]
|
LXC_IP = os.environ["LXC_IP"]
|
||||||
BASE_URL = os.environ["BASE_URL"].rstrip("/")
|
BASE_URL = os.environ["BASE_URL"].rstrip("/")
|
||||||
|
APP_DOMAIN = BASE_URL.replace("https://", "").replace("http://", "").split("/")[0]
|
||||||
|
|
||||||
DEFAULTS = {
|
DEFAULTS = {
|
||||||
"base_url": BASE_URL,
|
"base_url": BASE_URL,
|
||||||
|
@ -145,7 +146,7 @@ def run(tests):
|
||||||
full_params.update(params)
|
full_params.update(params)
|
||||||
for key, value in full_params.items():
|
for key, value in full_params.items():
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
full_params[key] = value.replace("__USER__", USER)
|
full_params[key] = value.replace("__USER__", USER).replace("__DOMAIN__", APP_DOMAIN)
|
||||||
|
|
||||||
results[name] = test(**full_params)
|
results[name] = test(**full_params)
|
||||||
display_result(results[name])
|
display_result(results[name])
|
||||||
|
|
Loading…
Add table
Reference in a new issue