These stuffs are not used or dont do anything anymore

This commit is contained in:
Alexandre Aubin 2020-12-02 20:10:37 +01:00
parent 679b418982
commit 14908abbd5
2 changed files with 3 additions and 55 deletions

View file

@ -669,7 +669,6 @@ TEST_RESULTS () {
[ $RESULT_check_private -ne -1 ] && \ [ $RESULT_check_private -ne -1 ] && \
[ $RESULT_check_public -ne -1 ] && \ [ $RESULT_check_public -ne -1 ] && \
[ $RESULT_check_multi_instance -ne -1 ] && \ [ $RESULT_check_multi_instance -ne -1 ] && \
[ $RESULT_check_path -ne -1 ] && \
[ $RESULT_check_port -ne -1 ] && \ [ $RESULT_check_port -ne -1 ] && \
[ $RESULT_check_backup -ne -1 ] && \ [ $RESULT_check_backup -ne -1 ] && \
[ $RESULT_check_restore -ne -1 ] && \ [ $RESULT_check_restore -ne -1 ] && \
@ -853,7 +852,6 @@ initialize_values() {
RESULT_check_private=0 RESULT_check_private=0
RESULT_check_public=0 RESULT_check_public=0
RESULT_check_multi_instance=0 RESULT_check_multi_instance=0
RESULT_check_path=0
RESULT_check_port=0 RESULT_check_port=0
RESULT_change_url=0 RESULT_change_url=0
RESULT_action_config_panel=0 RESULT_action_config_panel=0
@ -1124,8 +1122,6 @@ then
count_test $backup_restore count_test $backup_restore
multi_instance=$(read_check_option multi_instance) multi_instance=$(read_check_option multi_instance)
count_test $multi_instance count_test $multi_instance
incorrect_path=0
count_test $incorrect_path
port_already_use=$(read_check_option port_already_use) port_already_use=$(read_check_option port_already_use)
count_test $port_already_use count_test $port_already_use
change_url=$(read_check_option change_url) change_url=$(read_check_option change_url)
@ -1210,7 +1206,6 @@ else
setup_public=1 setup_public=1
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
incorrect_path=0
port_already_use=0 port_already_use=0
change_url=0 change_url=0
all_test=$((all_test+9)) all_test=$((all_test+9))
@ -1268,7 +1263,6 @@ else
setup_sub_dir=0 setup_sub_dir=0
count_test "$setup_root" || setup_root=0 count_test "$setup_root" || setup_root=0
count_test "$multi_instance" || multi_instance=0 count_test "$multi_instance" || multi_instance=0
count_test "$incorrect_path" || incorrect_path=0
setup_nourl=1 setup_nourl=1
fi fi
if [ -z "$path_arg" ] if [ -z "$path_arg" ]
@ -1276,7 +1270,6 @@ else
error "The manifest key for path was not found." error "The manifest key for path was not found."
count_test "$setup_root" || setup_root=0 count_test "$setup_root" || setup_root=0
count_test "$multi_instance" || multi_instance=0 count_test "$multi_instance" || multi_instance=0
count_test "$incorrect_path" || incorrect_path=0
fi fi
if [ -z "$public_arg" ] if [ -z "$public_arg" ]
then then

View file

@ -436,17 +436,6 @@ start_test () {
cur_test=$((cur_test+1)) cur_test=$((cur_test+1))
} }
check_manifest_key () {
# Check if a manifest key is set
# $1 = manifest key
if [ -z "${1}_arg" ] # FIXME : How can this ever be true ? wtf ?
then
error "Unable to find a manifest key for '${1,,}' in the check_process file. therefore this test cannot be performed"
return 1
fi
}
replace_manifest_key () { replace_manifest_key () {
# Replace a generic manifest key by another # Replace a generic manifest key by another
# $1 = Manifest key # $1 = Manifest key
@ -549,12 +538,6 @@ CHECK_SETUP () {
use_curl=0 use_curl=0
fi fi
# Check if the needed manifest key are set or abort the test
if [ "$install_type" != "no_url" ]; then
check_manifest_key "domain" || return
check_manifest_key "path" || return
fi
# Copy original arguments # Copy original arguments
local manifest_args_mod="$manifest_arguments" local manifest_args_mod="$manifest_arguments"
@ -797,10 +780,6 @@ CHECK_PUBLIC_PRIVATE () {
start_test "Installation in public mode" start_test "Installation in public mode"
fi fi
# Check if the needed manifest key are set or abort the test
check_manifest_key "public" || return
check_manifest_key "public_public" || return
check_manifest_key "public_private" || return
# Check if an install have previously work # Check if an install have previously work
is_install_failed || return is_install_failed || return
@ -1021,14 +1000,8 @@ CHECK_COMMON_ERROR () {
# $1 = install type # $1 = install type
local install_type=$1 local install_type=$1
if [ "$install_type" = "incorrect_path" ]; then if [ "$install_type" = "port_already_use" ]
start_test "Malformed path"
# Check if the needed manifest key are set or abort the test
check_manifest_key "path" || return
else [ "$install_type" = "port_already_use" ]
start_test "Port already used" start_test "Port already used"
# Check if the needed manifest key are set or abort the test
check_manifest_key "port" || return
fi fi
# Check if an install have previously work # Check if an install have previously work
@ -1044,13 +1017,7 @@ CHECK_COMMON_ERROR () {
replace_manifest_key "public" "$public_public_arg" replace_manifest_key "public" "$public_public_arg"
# Replace path manifest key for the test # Replace path manifest key for the test
if [ "$install_type" = "incorrect_path" ]; then if [ "$install_type" = "port_already_use" ]
# Change the path from /path to path/
local wrong_path=${test_path#/}/
# Use this wrong path only for the arguments that will give to yunohost for installation.
replace_manifest_key "path" "$wrong_path"
local check_path=$test_path
else [ "$install_type" = "port_already_use" ]
# Use a path according to previous succeeded installs # Use a path according to previous succeeded installs
if [ $sub_dir_install -eq 1 ]; then if [ $sub_dir_install -eq 1 ]; then
local check_path=$test_path local check_path=$test_path
@ -1102,10 +1069,7 @@ CHECK_COMMON_ERROR () {
fi fi
# Fill the correct variable depend on the type of test # Fill the correct variable depend on the type of test
if [ "$install_type" = "incorrect_path" ] if [ "$install_type" = "port_already_use" ]; then
then
RESULT_check_path=$check_result_setup
elif [ "$install_type" = "port_already_use" ]; then
RESULT_check_port=$check_result_setup RESULT_check_port=$check_result_setup
fi fi
@ -1284,9 +1248,6 @@ CHECK_CHANGE_URL () {
start_test "Change URL" start_test "Change URL"
# Check if the needed manifest key are set or abort the test
check_manifest_key "domain" || return
# Check if an install have previously work # Check if an install have previously work
is_install_failed || return is_install_failed || return
@ -1493,9 +1454,6 @@ ACTIONS_CONFIG_PANEL () {
fi fi
fi fi
# Check if the needed manifest key are set or abort the test
check_manifest_key "domain" || return
# Check if an install have previously work # Check if an install have previously work
is_install_failed || return is_install_failed || return
@ -2008,9 +1966,6 @@ TESTING_PROCESS () {
# Try multi-instance installations # Try multi-instance installations
[ $multi_instance -eq 1 ] && TEST_LAUNCHER CHECK_MULTI_INSTANCE [ $multi_instance -eq 1 ] && TEST_LAUNCHER CHECK_MULTI_INSTANCE
# Try to install with an malformed path
[ $incorrect_path -eq 1 ] && TEST_LAUNCHER CHECK_COMMON_ERROR incorrect_path
# Try to install with a port already used # Try to install with a port already used
[ $port_already_use -eq 1 ] && TEST_LAUNCHER CHECK_COMMON_ERROR port_already_use [ $port_already_use -eq 1 ] && TEST_LAUNCHER CHECK_COMMON_ERROR port_already_use