From 3a4aab72b10bd474938d86d770102ebc970908db Mon Sep 17 00:00:00 2001 From: deajan Date: Fri, 23 Dec 2016 22:25:15 +0100 Subject: [PATCH] Mail fixes for tests --- dev/tests/conf/local.conf | 4 ++-- dev/tests/conf/old.conf | 2 +- dev/tests/conf/pull.conf | 4 ++-- dev/tests/conf/push.conf | 4 ++-- dev/tests/run_tests.sh | 22 ++++++++++++---------- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/dev/tests/conf/local.conf b/dev/tests/conf/local.conf index cb6d8d2..353582b 100644 --- a/dev/tests/conf/local.conf +++ b/dev/tests/conf/local.conf @@ -27,7 +27,7 @@ SQL_STORAGE="${HOME}/obackup-storage/sql" FILE_STORAGE="${HOME}/obackup-storage/files" ## Encryption -ENCRYPTION=no +ENCRYPTION=yes ## Backup encryption needs a temporary storage space in order to encrypt files before sending them (absolute paths of the local or remote system) CRYPT_STORAGE="${HOME}/obackup-storage/crypt" @@ -180,7 +180,7 @@ RSYNC_EXECUTABLE=rsync ###### ALERT OPTIONS ## Alert email addresses separated by a space character -DESTINATION_MAILS="ozy@netpower.fr" +DESTINATION_MAILS="" ## Windows specific (msys / cygwin environment) only mail options (used with mailsend.exe from muquit, http://github.com/muquit/mailsend or from sendemail.exe from Brandon Zehm, http://caspian.dotconf.net/menu/Software/SendEmail/ SENDER_MAIL="alert@your.system.tld" diff --git a/dev/tests/conf/old.conf b/dev/tests/conf/old.conf index 252b7f6..87402be 100644 --- a/dev/tests/conf/old.conf +++ b/dev/tests/conf/old.conf @@ -78,7 +78,7 @@ SOFT_MAX_EXEC_TIME_FILE_TASK=3600 HARD_MAX_EXEC_TIME_FILE_TASK=7200 ## Alert email adresses separated by a space character -DESTINATION_MAILS="ozy@netpower.fr" +DESTINATION_MAILS="your@mail.tld" ## Max execution time of whole backup process. Soft is warning only. Hard is warning and stopping whole backup process. SOFT_MAX_EXEC_TIME_TOTAL=30000 diff --git a/dev/tests/conf/pull.conf b/dev/tests/conf/pull.conf index 24d1974..e06b4d8 100644 --- a/dev/tests/conf/pull.conf +++ b/dev/tests/conf/pull.conf @@ -56,7 +56,7 @@ FILE_WARN_MIN_SPACE=1048576 ###### REMOTE ONLY OPTIONS ## In case of pulled or pushed backups, remote system URI needs to be supplied. -REMOTE_SYSTEM_URI="ssh://root@localhost:49999/" +REMOTE_SYSTEM_URI="ssh://root@localhost:22/" ## You can specify a RSA key (please use full path). If not defined, the default ~/.ssh/id_rsa will be used. See documentation for further information. SSH_RSA_PRIVATE_KEY="${HOME}/.ssh/id_rsa_local" @@ -180,7 +180,7 @@ RSYNC_EXECUTABLE=rsync ###### ALERT OPTIONS ## Alert email addresses separated by a space character -DESTINATION_MAILS="ozy@netpower.fr" +DESTINATION_MAILS="" ## Windows specific (msys / cygwin environment) only mail options (used with mailsend.exe from muquit, http://github.com/muquit/mailsend or from sendemail.exe from Brandon Zehm, http://caspian.dotconf.net/menu/Software/SendEmail/ SENDER_MAIL="alert@your.system.tld" diff --git a/dev/tests/conf/push.conf b/dev/tests/conf/push.conf index c562db5..facd65d 100644 --- a/dev/tests/conf/push.conf +++ b/dev/tests/conf/push.conf @@ -56,7 +56,7 @@ FILE_WARN_MIN_SPACE=1048576 ###### REMOTE ONLY OPTIONS ## In case of pulled or pushed backups, remote system URI needs to be supplied. -REMOTE_SYSTEM_URI="ssh://root@localhost:49999/" +REMOTE_SYSTEM_URI="ssh://root@localhost:22/" ## You can specify a RSA key (please use full path). If not defined, the default ~/.ssh/id_rsa will be used. See documentation for further information. SSH_RSA_PRIVATE_KEY="${HOME}/.ssh/id_rsa_local" @@ -180,7 +180,7 @@ RSYNC_EXECUTABLE=rsync ###### ALERT OPTIONS ## Alert email addresses separated by a space character -DESTINATION_MAILS="ozy@netpower.fr" +DESTINATION_MAILS="" ## Windows specific (msys / cygwin environment) only mail options (used with mailsend.exe from muquit, http://github.com/muquit/mailsend or from sendemail.exe from Brandon Zehm, http://caspian.dotconf.net/menu/Software/SendEmail/ SENDER_MAIL="alert@your.system.tld" diff --git a/dev/tests/run_tests.sh b/dev/tests/run_tests.sh index 06f5cbf..98ef357 100755 --- a/dev/tests/run_tests.sh +++ b/dev/tests/run_tests.sh @@ -311,7 +311,7 @@ function test_Merge () { # Check this for $TESTS_DIR should maybe not be this directory but $SOURCE_DIR or $DEST_DIR # Keep this function to check Travis environment GPG behavior -function disabled_test_GPG () { +function disabled_nope_test_GPG () { echo "Encrypting file" $CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TESTFILE$CRYPT_EXTENSION" --recipient "John Doe" --batch --yes --encrypt "$TESTS_DIR/$PASSFILE" assertEquals "Encrypt file" "0" $? @@ -341,7 +341,7 @@ function disabled_test_GPG () { assertEquals "Decrypt file using passphrase" "0" $? } -function test_LocalRun () { +function nope_test_LocalRun () { SetEncryption "$CONF_DIR/$LOCAL_CONF" false # Basic return code tests. Need to go deep into file presence testing @@ -389,7 +389,7 @@ function test_LocalRun () { } -function test_PullRun () { +function nope_test_PullRun () { SetEncryption "$CONF_DIR/$LOCAL_CONF" false # Basic return code tests. Need to go deep into file presence testing @@ -438,7 +438,7 @@ function test_PullRun () { } -function test_PushRun () { +function nope_test_PushRun () { SetEncryption "$CONF_DIR/$LOCAL_CONF" false # Basic return code tests. Need to go deep into file presence testing @@ -486,7 +486,7 @@ function test_PushRun () { } -function test_EncryptLocalRun () { +function nope_test_EncryptLocalRun () { SetEncryption "$CONF_DIR/$LOCAL_CONF" true cd "$OBACKUP_DIR" @@ -542,7 +542,7 @@ function test_EncryptLocalRun () { SetEncryption "$CONF_DIR/$LOCAL_CONF" false } -function test_EncryptPullRun () { +function nope_test_EncryptPullRun () { # Basic return code tests. Need to go deep into file presence testing SetEncryption "$CONF_DIR/$PULL_CONF" true @@ -598,7 +598,7 @@ function test_EncryptPullRun () { SetEncryption "$CONF_DIR/$PULL_CONF" false } -function test_EncryptPushRun () { +function nope_test_EncryptPushRun () { # Basic return code tests. Need to go deep into file presence testing SetEncryption "$CONF_DIR/$PUSH_CONF" true @@ -655,6 +655,8 @@ function test_EncryptPushRun () { } function test_timed_execution () { + cd "$OBACKUP_DIR" + SetConfFileValue "$CONF_DIR/$MAX_EXEC_CONF" "SOFT_MAX_EXEC_TIME_DB_TASK" 2 SetConfFileValue "$CONF_DIR/$MAX_EXEC_CONF" "HARD_MAX_EXEC_TIME_DB_TASK" 1000 SetConfFileValue "$CONF_DIR/$MAX_EXEC_CONF" "SOFT_MAX_EXEC_TIME_FILE_TASK" 1000 @@ -716,7 +718,7 @@ function test_timed_execution () { assertEquals "Hard max exec time total reached in obackup Return code" "1" $? } -function test_WaitForTaskCompletion () { +function nope_test_WaitForTaskCompletion () { local pids # Standard wait sleep 1 & @@ -763,7 +765,7 @@ function test_WaitForTaskCompletion () { assertEquals "WaitForTaskCompletion test 5" "2" $? } -function test_ParallelExec () { +function nope_test_ParallelExec () { local cmd # Test if parallelExec works correctly in array mode @@ -820,7 +822,7 @@ function test_ParallelExec () { } -function test_UpgradeConfPullRun () { +function nope_test_UpgradeConfPullRun () { # Basic return code tests. Need to go deep into file presence testing cd "$OBACKUP_DIR"