summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-09-09 15:50:43 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-09-09 15:50:43 +0200
commit33442edce73d2be8e8210af992e0ec5803d32a6e (patch)
tree581e99fbc19444dcd353d58a031c7709e55bef48 /t
parent1bedc13c66dd5a551e3e6e90b6df55002c7ded77 (diff)
downloadApp-BorgRestore-33442edce73d2be8e8210af992e0ec5803d32a6e.tar.gz
App-BorgRestore-33442edce73d2be8e8210af992e0ec5803d32a6e.tar.xz
handle_added_archives_with_db.t: Extend to verify that PathTimeTable/DB caching doesn't cause problems
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 't')
-rw-r--r--t/handle_added_archives_with_db.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/handle_added_archives_with_db.t b/t/handle_added_archives_with_db.t
index c587261..e090e25 100644
--- a/t/handle_added_archives_with_db.t
+++ b/t/handle_added_archives_with_db.t
@@ -26,6 +26,11 @@ for my $in_memory (0,1) {
$cb->("XXX, 1970-01-01 00:00:13 boot/foo");
$cb->("XXX, 1970-01-01 00:00:13 boot/foo/blub");
$cb->("XXX, 1970-01-01 00:00:19 boot/foo/bar");
+ $cb->("XXX, 1970-01-01 00:00:02 boot/test1");
+ $cb->("XXX, 1970-01-01 00:00:03 boot/test1/f1");
+ $cb->("XXX, 1970-01-01 00:00:04 boot/test1/f2");
+ $cb->("XXX, 1970-01-01 00:00:03 boot/test1/f3");
+ $cb->("XXX, 1970-01-01 00:00:02 boot/test1/f4");
} );
# Call the actual function we want to test
@@ -40,6 +45,11 @@ for my $in_memory (0,1) {
eq_or_diff($db->get_archives_for_path('boot/foo/blub'), [{archive => 'archive-1', modification_time => 13},]);
eq_or_diff($db->get_archives_for_path('boot/grub'), [{archive => 'archive-1', modification_time => 20},]);
eq_or_diff($db->get_archives_for_path('boot/grub/grub.cfg'), [{archive => 'archive-1', modification_time => 8},]);
+ eq_or_diff($db->get_archives_for_path('boot/test1'), [{archive => 'archive-1', modification_time => 4},]);
+ eq_or_diff($db->get_archives_for_path('boot/test1/f1'), [{archive => 'archive-1', modification_time => 3},]);
+ eq_or_diff($db->get_archives_for_path('boot/test1/f2'), [{archive => 'archive-1', modification_time => 4},]);
+ eq_or_diff($db->get_archives_for_path('boot/test1/f3'), [{archive => 'archive-1', modification_time => 3},]);
+ eq_or_diff($db->get_archives_for_path('boot/test1/f4'), [{archive => 'archive-1', modification_time => 2},]);
eq_or_diff($db->get_archives_for_path('lulz'), [{archive => 'archive-1', modification_time => undef},]);
}