Temporarily disabled conflictList test

This commit is contained in:
deajan 2018-07-01 10:55:07 +02:00
parent 4d322f7e6b
commit 0a8811cfb9
1 changed files with 29 additions and 25 deletions

View File

@ -305,7 +305,7 @@ function test_Merge () {
SetConfFileValue "$OSYNC_EXECUTABLE" "IS_STABLE" "yes" SetConfFileValue "$OSYNC_EXECUTABLE" "IS_STABLE" "yes"
} }
function nope_test_LargeFileSet () { function test_LargeFileSet () {
for i in "${osyncParameters[@]}"; do for i in "${osyncParameters[@]}"; do
cd "$OSYNC_DIR" cd "$OSYNC_DIR"
@ -323,7 +323,7 @@ function nope_test_LargeFileSet () {
done done
} }
function nope_test_Exclusions () { function test_Exclusions () {
# Will sync except php files # Will sync except php files
# RSYNC_EXCLUDE_PATTERN="*.php" is set at runtime for quicksync and in config files for other runs # RSYNC_EXCLUDE_PATTERN="*.php" is set at runtime for quicksync and in config files for other runs
@ -351,7 +351,7 @@ function nope_test_Exclusions () {
done done
} }
function nope_test_Deletetion () { function test_Deletetion () {
local iFile1="$INITIATOR_DIR/ific" local iFile1="$INITIATOR_DIR/ific"
local iFile2="$INITIATOR_DIR/ifoc" local iFile2="$INITIATOR_DIR/ifoc"
local tFile1="$TARGET_DIR/tfic" local tFile1="$TARGET_DIR/tfic"
@ -395,7 +395,7 @@ function nope_test_Deletetion () {
done done
} }
function nope_test_deletion_failure () { function test_deletion_failure () {
if [ "$LOCAL_OS" == "WinNT10" ] || [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "Cygwin" ]; then if [ "$LOCAL_OS" == "WinNT10" ] || [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "Cygwin" ]; then
echo "Skipping deletion failure test as Win10 does not have chattr support." echo "Skipping deletion failure test as Win10 does not have chattr support."
return 0 return 0
@ -462,7 +462,7 @@ function nope_test_deletion_failure () {
done done
} }
function nope_test_skip_deletion () { function test_skip_deletion () {
local modes local modes
if [ "$OSYNC_MIN_VERSION" == "1" ]; then if [ "$OSYNC_MIN_VERSION" == "1" ]; then
@ -538,7 +538,7 @@ function nope_test_skip_deletion () {
SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "SKIP_DELETION" "" SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "SKIP_DELETION" ""
} }
function nope_test_handle_symlinks () { function test_handle_symlinks () {
if [ "$OSYNC_MIN_VERSION" == "1" ]; then if [ "$OSYNC_MIN_VERSION" == "1" ]; then
echo "Skipping symlink tests as osync v1.1x didn't handle this." echo "Skipping symlink tests as osync v1.1x didn't handle this."
return 0 return 0
@ -719,7 +719,7 @@ function nope_test_handle_symlinks () {
done done
} }
function nope_test_softdeletion_cleanup () { function test_softdeletion_cleanup () {
#declare -A files #declare -A files
files=() files=()
@ -796,7 +796,7 @@ function nope_test_softdeletion_cleanup () {
} }
function nope_test_FileAttributePropagation () { function test_FileAttributePropagation () {
if [ "$TRAVIS_RUN" == true ]; then if [ "$TRAVIS_RUN" == true ]; then
echo "Skipping FileAttributePropagation tests as travis does not support getfacl / setfacl." echo "Skipping FileAttributePropagation tests as travis does not support getfacl / setfacl."
@ -874,7 +874,7 @@ function nope_test_FileAttributePropagation () {
done done
} }
function nope_test_ConflictBackups () { function test_ConflictBackups () {
for i in "${osyncParameters[@]}"; do for i in "${osyncParameters[@]}"; do
cd "$OSYNC_DIR" cd "$OSYNC_DIR"
PrepareLocalDirs PrepareLocalDirs
@ -910,7 +910,7 @@ function nope_test_ConflictBackups () {
done done
} }
function nope_test_MultipleConflictBackups () { function test_MultipleConflictBackups () {
local additionalParameters local additionalParameters
@ -972,7 +972,7 @@ function nope_test_MultipleConflictBackups () {
SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "CONFLICT_BACKUP_MULTIPLE" "no" SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "CONFLICT_BACKUP_MULTIPLE" "no"
} }
function nope_test_Locking () { function test_Locking () {
# local not running = resume # local not running = resume
# remote same instance_id = resume # remote same instance_id = resume
# remote different instance_id = stop # remote different instance_id = stop
@ -1079,7 +1079,7 @@ function nope_test_Locking () {
SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "FORCE_STRANGER_LOCK_RESUME" "no" SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "FORCE_STRANGER_LOCK_RESUME" "no"
} }
function test_ConflictDetetion () { function nope_test_ConflictDetetion () {
local result local result
# Tests compatible with v1.3+ # Tests compatible with v1.3+
@ -1089,7 +1089,7 @@ function test_ConflictDetetion () {
return 0 return 0
fi fi
for i in "${osyncParameters[@]}"; do for i in "${osyncParameters[0]}"; do
cd "$OSYNC_DIR" cd "$OSYNC_DIR"
PrepareLocalDirs PrepareLocalDirs
@ -1099,6 +1099,8 @@ function test_ConflictDetetion () {
touch "$INITIATOR_DIR/$FileA" touch "$INITIATOR_DIR/$FileA"
touch "$TARGET_DIR/$FileB" touch "$TARGET_DIR/$FileB"
touch "$INITIATOR_DIR/$FileB"
touch "$TARGET_DIR/$FileA"
# Initializing treeList # Initializing treeList
REMOTE_HOST_PING=$RHOST_PING $OSYNC_EXECUTABLE $i --initialize REMOTE_HOST_PING=$RHOST_PING $OSYNC_EXECUTABLE $i --initialize
@ -1108,25 +1110,27 @@ function test_ConflictDetetion () {
echo "A" > "$INITIATOR_DIR/$FileA" echo "A" > "$INITIATOR_DIR/$FileA"
echo "B" > "$TARGET_DIR/$FileB" echo "B" > "$TARGET_DIR/$FileB"
echo "AA" > "$TARGET_DIR/$FileA"
echo "BB" > "$INITIATOR_DIR/$FileB"
# Now run should return conflicts # Now run should return conflicts
REMOTE_HOST_PING=$RHOST_PING $OSYNC_EXECUTABLE $i --log-conflicts > "$TMP/output.log" REMOTE_HOST_PING=$RHOST_PING $OSYNC_EXECUTABLE $i --log-conflicts > "$FAKEROOT/output.log" 2>&1
result=$? result=$?
echo "$TMP/output.log" cat "$FAKEROOT/output.log"
assertEquals "Second run that should detect conflicts with parameters [$i]." "0" $result assertEquals "Second run that should detect conflicts with parameters [$i]." "0" $result
grep ">> $FileA" "$TMP/output.log" grep "$INITIATOR_DIR/$FileA -- $TARGET_DIR/$FileB" "$TMP/output.log"
assertEquals "Initiator conflict detect with parameters [$i]." "0" $? assertEquals "FileA conflict detect with parameters [$i]." "0" $?
grep "<< $FileB" "$TMP/output.log" grep "$INITIATOR_DIR/$FileB -- $TARGET_DIR/$FileB" "$TMP/output.log"
assertEquals "Target conflict detect with parameters [$i]." "0" $? assertEquals "FileB conflict detect with parameters [$i]." "0" $?
# TODO: Missing test for conflict prevalance # TODO: Missing test for conflict prevalance
done done
} }
function nope_test_WaitForTaskCompletion () { function test_WaitForTaskCompletion () {
local pids local pids
# Tests compatible with v1.1 syntax # Tests compatible with v1.1 syntax
@ -1220,7 +1224,7 @@ function nope_test_WaitForTaskCompletion () {
assertEquals "WaitForTaskCompletion test 5" "2" $? assertEquals "WaitForTaskCompletion test 5" "2" $?
} }
function nope_test_ParallelExec () { function test_ParallelExec () {
if [ "$OSYNC_MIN_VERSION" == "1" ]; then if [ "$OSYNC_MIN_VERSION" == "1" ]; then
echo "Skipping ParallelExec test because osync v1.1 ofunctions don't have this function." echo "Skipping ParallelExec test because osync v1.1 ofunctions don't have this function."
return 0 return 0
@ -1281,7 +1285,7 @@ function nope_test_ParallelExec () {
assertNotEquals "ParallelExec full test 3" "0" $? assertNotEquals "ParallelExec full test 3" "0" $?
} }
function nope_test_timedExecution () { function test_timedExecution () {
local arguments local arguments
local warnExitCode local warnExitCode
@ -1328,7 +1332,7 @@ function nope_test_timedExecution () {
done done
} }
function nope_test_UpgradeConfRun () { function test_UpgradeConfRun () {
if [ "$OSYNC_MIN_VERSION" == "1" ]; then if [ "$OSYNC_MIN_VERSION" == "1" ]; then
echo "Skipping Upgrade script test because no further dev will happen on this for v1.1" echo "Skipping Upgrade script test because no further dev will happen on this for v1.1"
return 0 return 0
@ -1354,7 +1358,7 @@ function nope_test_UpgradeConfRun () {
rm -f "$CONF_DIR/$TMP_OLD_CONF.save" rm -f "$CONF_DIR/$TMP_OLD_CONF.save"
} }
function nope_test_DaemonMode () { function test_DaemonMode () {
if [ "$LOCAL_OS" == "WinNT10" ] || [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "Cygwin" ]; then if [ "$LOCAL_OS" == "WinNT10" ] || [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "Cygwin" ]; then
echo "Skipping daemon mode test as [$LOCAL_OS] does not have inotifywait support." echo "Skipping daemon mode test as [$LOCAL_OS] does not have inotifywait support."
return 0 return 0
@ -1409,7 +1413,7 @@ function nope_test_DaemonMode () {
} }
function nope_test_NoRemoteAccessTest () { function test_NoRemoteAccessTest () {
RemoveSSH RemoveSSH
cd "$OSYNC_DIR" cd "$OSYNC_DIR"