Переглянути джерело

Actions and config_panel tests

Maniack Crudelis 5 роки тому
батько
коміт
de25d2d17f

+ 21 - 1
check_process

@@ -5,6 +5,15 @@
 		core_backup=1
 		apps_backup=1
 		frequency="Weekly"
+    ; Config_panel
+        main.encryption.encrypt=1|0
+        main.encryption.encryption_pwd=password1|password2
+        main.backup_types.core_backup=1|0
+        main.backup_types.apps_backup=1|0
+        main.backup_options.frequency=Daily|Each 3 days|Weekly|Biweekly|Monthly
+        main.backup_options.max_size=1000
+        main.overwrite_files.overwrite_cron=1|0
+        main.global_config.email_type=1|0
 	; Checks
 		pkg_linter=1
 		setup_sub_dir=0
@@ -18,11 +27,22 @@
 		multi_instance=1
 		port_already_use=0
 		change_url=0
+        config_panel=1
+;; Test actions without encryption
+# Actions can't be tested with the encryption on, because LXC does not support fuse.
+	; Manifest
+		encrypt=0
+		encryption_pwd=""
+		core_backup=1
+		apps_backup=1
+	; Checks
+		setup_nourl=1
+        actions=1
 ;;; Levels
 	Level 5=auto
 ;;; Options
 Email=
-Notification=down
+Notification=change
 ;;; Upgrade options
 	; commit=2b2793737d5e1374659cbb74838d10162a2147e6
 		name=03 Nov 2017 2b2793737d5e1374659cbb74838d10162a2147e6

+ 7 - 0
scripts/actions/clean_backups

@@ -9,6 +9,13 @@
 source scripts/_common.sh
 source /usr/share/yunohost/helpers
 
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
 #=================================================
 # RETRIEVE ARGUMENTS
 #=================================================

+ 7 - 0
scripts/actions/force_backup

@@ -9,6 +9,13 @@
 source scripts/_common.sh
 source /usr/share/yunohost/helpers
 
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
 #=================================================
 # RETRIEVE ARGUMENTS
 #=================================================

+ 8 - 0
scripts/actions/reset_default_config

@@ -9,11 +9,19 @@
 source scripts/_common.sh
 source /usr/share/yunohost/helpers
 
+#=================================================
+# MANAGE SCRIPT FAILURE
+#=================================================
+
+# Exit if an error occurs during the execution of the script
+ynh_abort_if_errors
+
 #=================================================
 # RETRIEVE ARGUMENTS
 #=================================================
 
 app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
+
 final_path=$(ynh_app_setting_get --app=$app --key=final_path)
 encrypt=$(ynh_app_setting_get --app=$app --key=encrypt)
 core_backup=$(ynh_app_setting_get --app=$app --key=core_backup)