mirror of
https://github.com/deajan/obackup.git
synced 2024-12-25 06:53:41 +01:00
Debug Travis CI tests
This commit is contained in:
parent
2ce18fb721
commit
05590e1266
@ -4,15 +4,20 @@
|
|||||||
|
|
||||||
#TODO: Must recreate files before each test set
|
#TODO: Must recreate files before each test set
|
||||||
|
|
||||||
|
ping localhost
|
||||||
|
gpg --help
|
||||||
|
|
||||||
OBACKUP_DIR="$(pwd)"
|
OBACKUP_DIR="$(pwd)"
|
||||||
OBACKUP_DIR=${OBACKUP_DIR%%/dev*}
|
OBACKUP_DIR=${OBACKUP_DIR%%/dev*}
|
||||||
DEV_DIR="$OBACKUP_DIR/dev"
|
DEV_DIR="$OBACKUP_DIR/dev"
|
||||||
TESTS_DIR="$DEV_DIR/tests"
|
TESTS_DIR="$DEV_DIR/tests"
|
||||||
|
|
||||||
if [ $TRAVIS_RUN == false ]; then
|
if [ "$TRAVIS_RUN" == true ]; then
|
||||||
CONF_DIR="$TESTS_DIR/conf-local"
|
echo "Running with travis settings"
|
||||||
else
|
|
||||||
CONF_DIR="$TESTS_DIR/conf-travis"
|
CONF_DIR="$TESTS_DIR/conf-travis"
|
||||||
|
else
|
||||||
|
echo "Running with local settings"
|
||||||
|
CONF_DIR="$TESTS_DIR/conf-local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LOCAL_CONF="local.conf"
|
LOCAL_CONF="local.conf"
|
||||||
@ -407,12 +412,12 @@ function test_EncryptPullRun () {
|
|||||||
assertEquals "Return code" "0" $?
|
assertEquals "Return code" "0" $?
|
||||||
|
|
||||||
for file in "${FilePresence[@]}"; do
|
for file in "${FilePresence[@]}"; do
|
||||||
[ -f "$TARGET_DIR_FILE_PULL/$file$CRYPT_EXTENSION" ]
|
[ -f "$TARGET_DIR_FILE_CRYPT/$file$CRYPT_EXTENSION" ]
|
||||||
assertEquals "File Presence [$TARGET_DIR_FILE_PULL/$file$CRYPT_EXTENSION]" "0" $?
|
assertEquals "File Presence [$TARGET_DIR_FILE_CRYPT/$file$CRYPT_EXTENSION]" "0" $?
|
||||||
done
|
done
|
||||||
|
|
||||||
# for file in "${FileExcluded[@]}"; do
|
# for file in "${FileExcluded[@]}"; do
|
||||||
# [ -f "$TARGET_DIR_FILE_PULL/$file$CRYPT_EXTENSION" ]
|
# [ -f "$TARGET_DIR_FILE_CRYPT/$file$CRYPT_EXTENSION" ]
|
||||||
# assertEquals "File Excluded [$TARGET_DIR_FILE_PULL/$file$CRYPT_EXTENSION]" "1" $?
|
# assertEquals "File Excluded [$TARGET_DIR_FILE_PULL/$file$CRYPT_EXTENSION]" "1" $?
|
||||||
# done
|
# done
|
||||||
|
|
||||||
@ -442,15 +447,15 @@ function test_EncryptPullRun () {
|
|||||||
assertEquals "Database rotated Presence [$TARGET_DIR_SQL_PULL/$file$CRYPT_EXTENSION]" "0" $?
|
assertEquals "Database rotated Presence [$TARGET_DIR_SQL_PULL/$file$CRYPT_EXTENSION]" "0" $?
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -d "$TARGET_DIR_FILE_PULL/$(dirname $SOURCE_DIR)$CRYPT_EXTENSION$ROTATE_1_EXTENSION" ]
|
[ -d "$TARGET_DIR_FILE_CRYPT/$(dirname $SOURCE_DIR)$CRYPT_EXTENSION$ROTATE_1_EXTENSION" ]
|
||||||
assertEquals "File rotated Presence [$TARGET_DIR_FILE_PULL/$(dirname $SOURCE_DIR)$CRYPT_EXTENSION$ROTATE_1_EXTENSION]" "0" $?
|
assertEquals "File rotated Presence [$TARGET_DIR_FILE_CRYPT/$(dirname $SOURCE_DIR)$CRYPT_EXTENSION$ROTATE_1_EXTENSION]" "0" $?
|
||||||
|
|
||||||
SetEncryption "$CONF_DIR/$PULL_CONF" false
|
SetEncryption "$CONF_DIR/$PULL_CONF" false
|
||||||
|
|
||||||
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_SQL_PULL" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_SQL_PULL" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
||||||
assertEquals "Decrypt sql storage" "0" $?
|
assertEquals "Decrypt sql storage" "0" $?
|
||||||
|
|
||||||
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_FILE_PULL" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_FILE_CRYPT" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
||||||
assertEquals "Decrypt file storage" "0" $?
|
assertEquals "Decrypt file storage" "0" $?
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -504,10 +509,10 @@ function test_EncryptPushRun () {
|
|||||||
|
|
||||||
SetEncryption "$CONF_DIR/$PUSH_CONF" false
|
SetEncryption "$CONF_DIR/$PUSH_CONF" false
|
||||||
|
|
||||||
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_SQL_PULL" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_SQL_PUSH" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
||||||
assertEquals "Decrypt sql storage" "0" $?
|
assertEquals "Decrypt sql storage" "0" $?
|
||||||
|
|
||||||
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_FILE_PULL" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
./$OBACKUP_EXECUTABLE --decrypt="$TARGET_DIR_FILE_PUSH" --passphrase-file="$TESTS_DIR/$PASSFILE"
|
||||||
assertEquals "Decrypt file storage" "0" $?
|
assertEquals "Decrypt file storage" "0" $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user