summaryrefslogtreecommitdiffstats
path: root/t/handle_added_archives_with_db.t
AgeCommit message (Collapse)AuthorFilesLines
2020-09-27DB: Fix incorrect subpath handling for path that is a superstring of theFlorian Pritz1-4/+14
previous path for top level paths Same issue as 62f5bc3ce90fedb396d103caae68dc2f211f1b16 except that this time it is the for top level paths (`/lib` and `/lib64`) which are handled outside the loop. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2020-09-27DB: Fix incorrect subpath handling for path that is a superstring of theFlorian Pritz1-4/+14
previous path Files that share a common substring (e.g. `/home/foo/.ssh/id_rsa` and `/home/foo/.ssh/id_rsa.pub`) could incorrectly trigger an optimization that was only supposed to be triggered if the first path is a directory. The first path would then not be added to the database cache even though it should have been. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-02-07DB/remove_archive: Properly handle cases where the DB is empty after removalFlorian Pritz1-0/+49
Empty here means that the DB does not contain any backup archive information because all information that is already in the db has to be removed. The old code tries to copy existing data into the new table, but since there are no archives to copy data for, the sql query fails. Also, it would copy all rows and only populate the path column, but if there are no archives that have timestamps, that's actually useless work. This patch ensures that the table is kept empty if there are no archives. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-02-07t/handle_added_archives: Document weird testFlorian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-02-07t/handle_added_archives: Add test for removal of archivesFlorian Pritz1-0/+23
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-13handle_added_archives_with_db.t: Add file that is removed in second backupFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12handle_added_archives_with_db.t: Add 2nd top level directory to testFlorian Pritz1-0/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Test if adding an archive updates existing rows correctlyFlorian Pritz1-0/+79
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09handle_added_archives_with_db.t: Extend to verify that PathTimeTable/DB ↵Florian Pritz1-0/+10
caching doesn't cause problems Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09handle_added_archives_with_db.t: Use new_no_defaults instead of newFlorian Pritz1-3/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Use strictures instead of strict/warningsFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-08Add TAP log adapter to all testsFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06t/handle_added_archives: Check for paths that should not be part of the dbFlorian Pritz1-0/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Test handled_added_archives with Memory and DB storageFlorian Pritz1-30/+35
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Add handle_added_archives db testFlorian Pritz1-0/+42
Signed-off-by: Florian Pritz <bluewind@xinu.at>