nextcloud-desktop/test
Christian Kamm 4bd062f5be
OwnSql: Distinguish no-data from error #6677
This could fix a problem where the client incorrectly decides to delete
local data.

Previously any sqlite3_step() return value that wasn't SQLITE_ROW would
be interpreted as "there's no more data here". Thus an sqlite error at a
bad time could cause the remote discovery to fail to read an unchanged
subtree from the database. These files would then be deleted locally.

With this change sqlite errors from sqlite3_step are detected and
logged. For the particular case of SyncJournalDb::getFilesBelowPath()
the error will now be propagated and the sync run will fail instead of
performing spurious deletes.

Note that many other database functions still don't distinguish
not-found from error cases. Most of them won't have as severe effects on
affected sync runs though.
2020-12-15 10:58:43 +01:00
..
benchmarks Enable bugprone-too-small-loop-variable clang-tidy check 2020-09-01 06:37:03 +00:00
csync Port the exclude test to the QTest Framework 2020-12-15 10:58:29 +01:00
manual/favlink License: Adjust license of GPLv2 source files to GPLv2+ 2016-10-25 11:06:54 +02:00
mockserver Use QDateTime::currentDateTimeUtc instead of the non utc version 2017-09-26 16:14:17 +02:00
scripts Database: Change path for new dbs to .sync_* #5904 2020-12-15 10:58:28 +01:00
CMakeLists.txt Discovery: Set right direction when restoring deleted discovery because it has modified files 2020-12-15 10:58:29 +01:00
nextcloud_add_test.cmake Cleanup CMake (output) 2020-12-15 10:58:23 +01:00
stubfolderman.cpp Fix leak in OCC::AccountManager stub for FolderManTest 2020-05-21 01:22:15 +02:00
stubremotewipe.cpp Enable all the misc clang-tidy check except one 2020-08-31 09:14:09 +02:00
syncenginetestutils.h Fix warnings about signedness 2020-12-15 10:58:41 +01:00
test_journal.db test_journal.db: Add checksumtype table 2017-06-22 15:11:49 +02:00
testallfilesdeleted.cpp SyncEngine: Fix the "direction" of the "all file delted" message when the server is reset 2020-12-15 10:58:02 +01:00
testblacklist.cpp Blacklist: remember the X-Request-ID 2020-12-15 10:57:53 +01:00
testchecksumvalidator.cpp Checksums: Work on QIODevice*s 2020-12-15 10:58:21 +01:00
testchunkingng.cpp Fix warnings about signedness 2020-12-15 10:58:41 +01:00
testclientsideencryption.cpp Add support for BASE64 encoded '|' when decrypting 2020-08-10 13:13:19 +02:00
testconcaturl.cpp Enable the modernize-use-using check on clang-tidy 2020-08-12 18:18:57 +02:00
testdatabaseerror.cpp Test that the sync behave well if there are errors while reading the database 2020-12-15 10:58:17 +01:00
testdownload.cpp apply http2 qt resend patch from owncloud 2019-12-25 13:59:15 +08:00
testexcludedfiles.cpp Windows: Forbid chars 0-31 in filenames #6987 2020-12-15 10:58:42 +01:00
testfolder.cpp Move Utility to a new common static library 2017-09-05 17:25:19 +02:00
testfolderman.cpp Enable bugprone-forward-declaration-namespace clang-tidy check 2020-09-01 06:37:03 +00:00
testfolderwatcher.cpp FolderWatcher linux: Make automatically recursive #7068 2020-11-24 16:56:49 +00:00
testhelper.h Once client gets 401/403 from the server, check if remote wipe was requested. 2019-10-17 20:11:31 +02:00
testinotifywatcher.cpp Move Utility to a new common static library 2017-09-05 17:25:19 +02:00
testlocaldiscovery.cpp Discovery: Handle the blacklistFiles from the server capabilities 2020-12-15 10:58:30 +01:00
testlockedfiles.cpp Test: Add test for locked file tracking and propagation 2020-12-15 10:58:17 +01:00
testnetrcparser.cpp For tests we do not need a xserver running. 2016-05-12 11:34:21 +02:00
testnextcloudpropagator.cpp Enable the modernize-use-using check on clang-tidy 2020-08-12 18:18:57 +02:00
testoauth.cpp Remove useless virtual, better use override only 2020-05-18 20:45:20 +02:00
testownsql.cpp OwnSql: Distinguish no-data from error #6677 2020-12-15 10:58:43 +01:00
testpermissions.cpp OwnSql: Distinguish no-data from error #6677 2020-12-15 10:58:43 +01:00
testplan.txt Minor typos in client test section 2015-09-10 18:11:44 +05:45
testremotediscovery.cpp RemoteDiscoveryTest: Fix after the merge from 2.5 2020-12-15 10:58:16 +01:00
testremotewipe.cpp Once client gets 401/403 from the server, check if remote wipe was requested. 2019-10-17 20:11:31 +02:00
testselectivesync.cpp Ensure local discovery on selective sync changes 2020-12-15 10:58:41 +01:00
testsyncconflict.cpp Discovery: Remove stale DB entries 2020-12-15 10:58:10 +01:00
testsyncdelete.cpp Move test for issue #1329 from t1.pl to new test system 2020-12-15 10:58:29 +01:00
testsyncengine.cpp Ensure local discovery on selective sync changes 2020-12-15 10:58:41 +01:00
testsyncfileitem.cpp For tests we do not need a xserver running. 2016-05-12 11:34:21 +02:00
testsyncfilestatustracker.cpp SyncFileStatusTracker: Distinguish Warning and Excluded 2020-12-15 10:58:38 +01:00
testsyncjournaldb.cpp Ensure local discovery on selective sync changes 2020-12-15 10:58:41 +01:00
testsyncmove.cpp Discovery win: Fix detection of case-only renames 2020-12-15 10:58:42 +01:00
testsyncvirtualfiles.cpp Ensure local discovery on selective sync changes 2020-12-15 10:58:41 +01:00
testupdater.cpp For tests we do not need a xserver running. 2016-05-12 11:34:21 +02:00
testuploadreset.cpp Fix warnings about signedness 2020-12-15 10:58:41 +01:00
testutility.cpp Test: Move the test for Utility::normalizeEtag to testutility.cpp 2020-12-15 10:58:28 +01:00
testxmlparse.cpp Properly handle denormalized href 2020-05-18 19:33:34 +02:00