Added quicksync instance IDs

This commit is contained in:
deajan 2016-11-13 15:11:06 +01:00
parent 6841513702
commit 91bd655fa1
1 changed files with 13 additions and 6 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# osync test suite 2016111301 # osync test suite 2016111302
# 4 tests: # 4 tests:
# quicklocal # quicklocal
@ -63,8 +63,8 @@ OSYNC_BACKUP_DIR="$OSYNC_WORKDIR/backup"
# Setup an array with all function modes # Setup an array with all function modes
declare -Ag osyncParameters declare -Ag osyncParameters
osyncParameters[quicklocal]="--initiator=$INITIATOR_DIR --target=$TARGET_DIR" osyncParameters[quicklocal]="--initiator=$INITIATOR_DIR --target=$TARGET_DIR --instance-id=quicklocal"
osyncParameters[quickRemote]="--initiator=$INITIATOR_DIR --target=ssh://localhost:$SSH_PORT/$TARGET_DIR --rsakey=${HOME}/.ssh/id_rsa_local" osyncParameters[quickRemote]="--initiator=$INITIATOR_DIR --target=ssh://localhost:$SSH_PORT/$TARGET_DIR --rsakey=${HOME}/.ssh/id_rsa_local --instance-id=quickremote"
osyncParameters[confLocal]="$CONF_DIR/local.conf" osyncParameters[confLocal]="$CONF_DIR/local.conf"
osyncParameters[confRemote]="$CONF_DIR/remote.conf" osyncParameters[confRemote]="$CONF_DIR/remote.conf"
#osyncParameters[daemonlocal]="$CONF_DIR/local.conf --on-changes" #osyncParameters[daemonlocal]="$CONF_DIR/local.conf --on-changes"
@ -255,7 +255,6 @@ function test_softdeletion_cleanup () {
files[backedUpFileSlave]="$TARGET_DIR/$OSYNC_BACKUP_DIR/someBackedUpFileSlave" files[backedUpFileSlave]="$TARGET_DIR/$OSYNC_BACKUP_DIR/someBackedUpFileSlave"
for i in "${osyncParameters[@]}"; do for i in "${osyncParameters[@]}"; do
cd "$OSYNC_DIR" cd "$OSYNC_DIR"
PrepareLocalDirs PrepareLocalDirs
# First run # First run
@ -273,7 +272,11 @@ function test_softdeletion_cleanup () {
fi fi
touch "$file.new" touch "$file.new"
#TODO: CreateOldFile does not work under travis yet (debugfs does not work, drop caches neither)
if [ "$TRAVIS_RUN" != true ]; then
CreateOldFile "$file.old" CreateOldFile "$file.old"
fi
done done
REMOTE_HOST_PING=no ./$OSYNC_EXECUTABLE $i REMOTE_HOST_PING=no ./$OSYNC_EXECUTABLE $i
@ -283,7 +286,11 @@ function test_softdeletion_cleanup () {
[ -f "$file.new" ] [ -f "$file.new" ]
assertEquals "New softdeleted / backed up file [$file.new] exists." "0" $? assertEquals "New softdeleted / backed up file [$file.new] exists." "0" $?
[ ! -f "$file.old" ] [ ! -f "$file.old" ]
if [ "$TRAVIS_RUN" != true ]; then
assertEquals "Old softdeleted / backed up file [$file.old] is deleted permanently." "1" $? assertEquals "Old softdeleted / backed up file [$file.old] is deleted permanently." "1" $?
else
assertEquals "Old softdeleted / backed up file [$file.old] is deleted permanently." "0" $?
fi
done done
done done