mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Fix change_url tests
This commit is contained in:
parent
7519d4ae8c
commit
ec9221d47c
1 changed files with 21 additions and 1 deletions
|
@ -1354,7 +1354,7 @@ CHECK_CHANGE_URL () {
|
||||||
# Without modify the domain, root to path, path to path and path to root.
|
# Without modify the domain, root to path, path to path and path to root.
|
||||||
# And then, same with a domain change
|
# And then, same with a domain change
|
||||||
local i=0
|
local i=0
|
||||||
for i in `seq 1 6`
|
for i in `seq 1 7`
|
||||||
do
|
do
|
||||||
if [ $i -eq 1 ]; then
|
if [ $i -eq 1 ]; then
|
||||||
# Same domain, root to path
|
# Same domain, root to path
|
||||||
|
@ -1387,9 +1387,19 @@ CHECK_CHANGE_URL () {
|
||||||
check_path=$test_path
|
check_path=$test_path
|
||||||
local new_path=/
|
local new_path=/
|
||||||
local new_domain=$main_domain
|
local new_domain=$main_domain
|
||||||
|
elif [ $i -eq 7 ]; then
|
||||||
|
# Other domain, root to root
|
||||||
|
check_path=/
|
||||||
|
local new_path=/
|
||||||
|
local new_domain=$main_domain
|
||||||
fi
|
fi
|
||||||
replace_manifest_key "path" "$check_path"
|
replace_manifest_key "path" "$check_path"
|
||||||
|
|
||||||
|
# Ignore the test if it tries to move to the same address
|
||||||
|
if [ "$check_path" == "$new_path" ] && [ "$new_domain" == "$sub_domain" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if root or subpath installation worked, or if force_install_ok is setted.
|
# Check if root or subpath installation worked, or if force_install_ok is setted.
|
||||||
# Try with a sub path install
|
# Try with a sub path install
|
||||||
if [ "$check_path" = "/" ]
|
if [ "$check_path" = "/" ]
|
||||||
|
@ -1399,6 +1409,11 @@ CHECK_CHANGE_URL () {
|
||||||
# Jump this test
|
# Jump this test
|
||||||
ECHO_FORMAT "Root install failed, impossible to perform this test...\n" "lyellow" clog
|
ECHO_FORMAT "Root install failed, impossible to perform this test...\n" "lyellow" clog
|
||||||
continue
|
continue
|
||||||
|
elif [ "$new_path" != "/" ] && [ $sub_dir_install -eq 0 ]
|
||||||
|
then
|
||||||
|
# Jump this test
|
||||||
|
ECHO_FORMAT "Sub path install failed, impossible to perform this test...\n" "lyellow" clog
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
# And with a sub path install
|
# And with a sub path install
|
||||||
else
|
else
|
||||||
|
@ -1407,6 +1422,11 @@ CHECK_CHANGE_URL () {
|
||||||
# Jump this test
|
# Jump this test
|
||||||
ECHO_FORMAT "Sub path install failed, impossible to perform this test...\n" "lyellow" clog
|
ECHO_FORMAT "Sub path install failed, impossible to perform this test...\n" "lyellow" clog
|
||||||
continue
|
continue
|
||||||
|
elif [ "$new_path" = "/" ] && [ $root_install -eq 0 ]
|
||||||
|
then
|
||||||
|
# Jump this test
|
||||||
|
ECHO_FORMAT "Root install failed, impossible to perform this test...\n" "lyellow" clog
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue