root/trunk/t/01-backup.t

Revision 157, 0.8 kB (checked in by bradfitz, 3 years ago)

make tests pass on OS X (Jesse Vincent)

Line 
1# -*-perl-*-
2
3use strict;
4use Test::More tests => 12;
5
6use Brackup::Test;
7use FindBin qw($Bin);
8use Brackup::Util qw(tempfile);
9
10############### Backup
11
12my ($digdb_fh, $digdb_fn) = tempfile();
13close($digdb_fh);
14my $root_dir = "$Bin/data";
15ok(-d $root_dir, "test data to backup exists");
16my $backup_file = do_backup(
17                            with_confsec => sub {
18                                my $csec = shift;
19                                $csec->add("path",          $root_dir);
20                                $csec->add("chunk_size",    "2k");
21                                $csec->add("digestdb_file", $digdb_fn);
22                            },
23                            );
24
25############### Restore
26
27my $restore_dir = do_restore($backup_file);
28
29ok_dirs_match($restore_dir, $root_dir);
30
Note: See TracBrowser for help on using the browser.