From 386634d751d5da68df52b8cd31a8fe8bf4de3c38 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sat, 17 Jun 2017 20:24:50 +0200 Subject: [PATCH] New test reinstall after remove --- README-fr.md | 8 ++++---- README.md | 8 ++++---- check_process | 2 +- sub_scripts/testing_process.sh | 20 ++++++++++++++++++++ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/README-fr.md b/README-fr.md index d27e5a8..5e13978 100644 --- a/README-fr.md +++ b/README-fr.md @@ -51,12 +51,12 @@ package_check/package_check.sh APP_ynh ;; Nom du test # Commentaire ignoré ; Manifest - domain="$DOMAIN" (DOMAIN) - path="$PATH" (PATH) - admin="$USER" (USER) + domain="domain.tld" (DOMAIN) + path="/path" (PATH) + admin="john" (USER) language="fr" is_public=1 (PUBLIC|public=1|private=0) - password="$PASSWORD" (PASSWORD) + password="password" port="666" (PORT) ; Checks pkg_linter=1 diff --git a/README.md b/README.md index 54786f5..e43f94d 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,12 @@ package_check/package_check.sh APP_ynh ;; Test name # Comment ignored ; Manifest - domain="$DOMAIN" (DOMAIN) - path="$PATH" (PATH) - admin="$USER" (USER) + domain="domain.tld" (DOMAIN) + path="/path" (PATH) + admin="john" (USER) language="en" is_public=1 (PUBLIC|public=1|private=0) - password="$PASSWORD" (PASSWORD) + password="password" port="666" (PORT) ; Checks pkg_linter=1 diff --git a/check_process b/check_process index a9f8844..56fb1ca 100644 --- a/check_process +++ b/check_process @@ -7,7 +7,7 @@ language="fr" # is_public="Yes" (PUBLIC|public=Yes|private=No) is_public=1 (PUBLIC|public=1|private=0) - password="pass" + password="password" port="666" (PORT) ; Checks pkg_linter=1 diff --git a/sub_scripts/testing_process.sh b/sub_scripts/testing_process.sh index 73c4555..4ca2a5c 100644 --- a/sub_scripts/testing_process.sh +++ b/sub_scripts/testing_process.sh @@ -475,6 +475,26 @@ CHECK_SETUP () { local check_result_remove=-1 # Remove in sub path failed fi + # Reinstall the application after the removing + # Try to resintall only if the first install is a success. + if [ $check_result_setup -eq 1 ] + then + ECHO_FORMAT "\nReinstall the application after a removing.\n" "white" "bold" clog + + SETUP_APP + + # Try to access the app by its url + CHECK_URL + + # Check the result and print SUCCESS or FAIL + if check_test_result + then # Success + local check_result_setup=1 # Installation succeed + else # Fail + local check_result_setup=-1 # Installation failed + fi + fi + # Fill the correct variable depend on the type of test if [ "$install_type" = "subdir" ] then