From 0a8811cfb95b1d658441702e108cf14261496019 Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 1 Jul 2018 10:55:07 +0200 Subject: [PATCH] Temporarily disabled conflictList test --- dev/tests/run_tests.sh | 54 +++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/dev/tests/run_tests.sh b/dev/tests/run_tests.sh index 55b19da..88ab1f9 100755 --- a/dev/tests/run_tests.sh +++ b/dev/tests/run_tests.sh @@ -305,7 +305,7 @@ function test_Merge () { SetConfFileValue "$OSYNC_EXECUTABLE" "IS_STABLE" "yes" } -function nope_test_LargeFileSet () { +function test_LargeFileSet () { for i in "${osyncParameters[@]}"; do cd "$OSYNC_DIR" @@ -323,7 +323,7 @@ function nope_test_LargeFileSet () { done } -function nope_test_Exclusions () { +function test_Exclusions () { # Will sync except php files # 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 } -function nope_test_Deletetion () { +function test_Deletetion () { local iFile1="$INITIATOR_DIR/ific" local iFile2="$INITIATOR_DIR/ifoc" local tFile1="$TARGET_DIR/tfic" @@ -395,7 +395,7 @@ function nope_test_Deletetion () { done } -function nope_test_deletion_failure () { +function test_deletion_failure () { if [ "$LOCAL_OS" == "WinNT10" ] || [ "$LOCAL_OS" == "msys" ] || [ "$LOCAL_OS" == "Cygwin" ]; then echo "Skipping deletion failure test as Win10 does not have chattr support." return 0 @@ -462,7 +462,7 @@ function nope_test_deletion_failure () { done } -function nope_test_skip_deletion () { +function test_skip_deletion () { local modes if [ "$OSYNC_MIN_VERSION" == "1" ]; then @@ -538,7 +538,7 @@ function nope_test_skip_deletion () { SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "SKIP_DELETION" "" } -function nope_test_handle_symlinks () { +function test_handle_symlinks () { if [ "$OSYNC_MIN_VERSION" == "1" ]; then echo "Skipping symlink tests as osync v1.1x didn't handle this." return 0 @@ -719,7 +719,7 @@ function nope_test_handle_symlinks () { done } -function nope_test_softdeletion_cleanup () { +function test_softdeletion_cleanup () { #declare -A files files=() @@ -796,7 +796,7 @@ function nope_test_softdeletion_cleanup () { } -function nope_test_FileAttributePropagation () { +function test_FileAttributePropagation () { if [ "$TRAVIS_RUN" == true ]; then echo "Skipping FileAttributePropagation tests as travis does not support getfacl / setfacl." @@ -874,7 +874,7 @@ function nope_test_FileAttributePropagation () { done } -function nope_test_ConflictBackups () { +function test_ConflictBackups () { for i in "${osyncParameters[@]}"; do cd "$OSYNC_DIR" PrepareLocalDirs @@ -910,7 +910,7 @@ function nope_test_ConflictBackups () { done } -function nope_test_MultipleConflictBackups () { +function test_MultipleConflictBackups () { local additionalParameters @@ -972,7 +972,7 @@ function nope_test_MultipleConflictBackups () { SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "CONFLICT_BACKUP_MULTIPLE" "no" } -function nope_test_Locking () { +function test_Locking () { # local not running = resume # remote same instance_id = resume # remote different instance_id = stop @@ -1079,7 +1079,7 @@ function nope_test_Locking () { SetConfFileValue "$CONF_DIR/$REMOTE_CONF" "FORCE_STRANGER_LOCK_RESUME" "no" } -function test_ConflictDetetion () { +function nope_test_ConflictDetetion () { local result # Tests compatible with v1.3+ @@ -1089,7 +1089,7 @@ function test_ConflictDetetion () { return 0 fi - for i in "${osyncParameters[@]}"; do + for i in "${osyncParameters[0]}"; do cd "$OSYNC_DIR" PrepareLocalDirs @@ -1099,6 +1099,8 @@ function test_ConflictDetetion () { touch "$INITIATOR_DIR/$FileA" touch "$TARGET_DIR/$FileB" + touch "$INITIATOR_DIR/$FileB" + touch "$TARGET_DIR/$FileA" # Initializing treeList REMOTE_HOST_PING=$RHOST_PING $OSYNC_EXECUTABLE $i --initialize @@ -1108,25 +1110,27 @@ function test_ConflictDetetion () { echo "A" > "$INITIATOR_DIR/$FileA" echo "B" > "$TARGET_DIR/$FileB" + echo "AA" > "$TARGET_DIR/$FileA" + echo "BB" > "$INITIATOR_DIR/$FileB" # 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=$? - echo "$TMP/output.log" + cat "$FAKEROOT/output.log" assertEquals "Second run that should detect conflicts with parameters [$i]." "0" $result - grep ">> $FileA" "$TMP/output.log" - assertEquals "Initiator conflict detect with parameters [$i]." "0" $? + grep "$INITIATOR_DIR/$FileA -- $TARGET_DIR/$FileB" "$TMP/output.log" + assertEquals "FileA conflict detect with parameters [$i]." "0" $? - grep "<< $FileB" "$TMP/output.log" - assertEquals "Target conflict detect with parameters [$i]." "0" $? + grep "$INITIATOR_DIR/$FileB -- $TARGET_DIR/$FileB" "$TMP/output.log" + assertEquals "FileB conflict detect with parameters [$i]." "0" $? # TODO: Missing test for conflict prevalance done } -function nope_test_WaitForTaskCompletion () { +function test_WaitForTaskCompletion () { local pids # Tests compatible with v1.1 syntax @@ -1220,7 +1224,7 @@ function nope_test_WaitForTaskCompletion () { assertEquals "WaitForTaskCompletion test 5" "2" $? } -function nope_test_ParallelExec () { +function test_ParallelExec () { if [ "$OSYNC_MIN_VERSION" == "1" ]; then echo "Skipping ParallelExec test because osync v1.1 ofunctions don't have this function." return 0 @@ -1281,7 +1285,7 @@ function nope_test_ParallelExec () { assertNotEquals "ParallelExec full test 3" "0" $? } -function nope_test_timedExecution () { +function test_timedExecution () { local arguments local warnExitCode @@ -1328,7 +1332,7 @@ function nope_test_timedExecution () { done } -function nope_test_UpgradeConfRun () { +function test_UpgradeConfRun () { if [ "$OSYNC_MIN_VERSION" == "1" ]; then echo "Skipping Upgrade script test because no further dev will happen on this for v1.1" return 0 @@ -1354,7 +1358,7 @@ function nope_test_UpgradeConfRun () { 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 echo "Skipping daemon mode test as [$LOCAL_OS] does not have inotifywait support." return 0 @@ -1409,7 +1413,7 @@ function nope_test_DaemonMode () { } -function nope_test_NoRemoteAccessTest () { +function test_NoRemoteAccessTest () { RemoveSSH cd "$OSYNC_DIR"