summaryrefslogtreecommitdiffstats
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2019-09-28Helper: Remove untaint_archive_nameFlorian Pritz1-19/+0
We no longer need a special whitelist for archive names since the database no longer uses them as column keys. We still need to untaint variables that are passed to DBI so we use untaint() for this now. We also move the location of the untaint call closer to its usage with DBI/system() to prevent untainted data from leaking elsewhere. Fixes #4 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 Pritz11-21/+11
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Get settings via hash instead of direct variable accessFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-08Add TAP log adapter to all testsFlorian Pritz8-1/+8
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>
2018-08-19Test compilation of all packagesFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19Reorganize testsFlorian Pritz10-0/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19t/find_archives: Check exception stringFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19Add search_path and find_archives integration testsFlorian Pritz2-0/+89
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-01-24t/parsing: Fix unmocked method verify_cache_fill_rate_ok warningFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21Enable --adhoc automatically when cache is emptyFlorian Pritz1-0/+22
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-06-11Use Test::Pod::Coverage for main packageFlorian Pritz1-0/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-06-06Use Test::PodFlorian Pritz1-0/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-11t2_parsing: Ensure the timezone is reset after modifying TZFlorian Pritz1-2/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-11t2_parsing: Force UTC timezoneFlorian Pritz1-7/+9
The test only worked in GMT+1 before this... Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-10t/02_parsing: Fix too many arguments to _handle_added_archivesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-01Mark some functions privateFlorian Pritz2-10/+10
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-01Do not pass $opts to main classFlorian Pritz3-3/+3
The only reason this was done, was for the debug output. This no longer requires large amounts of memory or time (simple count(*) in the db now) so this is no longer necessary. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-13Fix 02_parsing.tFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-12Fix sort order of detected archivesFlorian Pritz1-0/+29
cmp sorts strings, <=> sorts numbers Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Add new_no_defaults constructor for test suiteFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Test timespec_to_secondsFlorian Pritz1-0/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Test adding of new archivesFlorian Pritz1-0/+49
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-02Allow dots in archive namesFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-02-27Test Helper::untaint_archive_nameFlorian Pritz1-0/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-02-26initial commitFlorian Pritz1-0/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>