X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2FAmanda_Taper_Scan.pl;fp=installcheck%2FAmanda_Taper_Scan.pl;h=a2d96093d7a24f264e7fb4a496dc90a0ac2301c2;hb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;hp=92550f100e47922e51f3e70d9580c37665c877da;hpb=011a59f5a54864108a16af570a6b287410597cc2;p=debian%2Famanda diff --git a/installcheck/Amanda_Taper_Scan.pl b/installcheck/Amanda_Taper_Scan.pl index 92550f1..a2d9609 100644 --- a/installcheck/Amanda_Taper_Scan.pl +++ b/installcheck/Amanda_Taper_Scan.pl @@ -38,10 +38,11 @@ Installcheck::log_test_output(); # and disable Debug's die() and warn() overrides Amanda::Debug::disable_die_override(); -my $tapelist = "$Installcheck::TMP/tapelist"; +my $tapelist_filename = "$Installcheck::TMP/tapelist"; +my $tapelist = Amanda::Tapelist->new($tapelist_filename); sub set_tapelist { my ($content) = @_; - open(my $fh, ">", $tapelist) or die("opening '$tapelist': $!"); + open(my $fh, ">", $tapelist_filename) or die("opening '$tapelist_filename': $!"); print $fh $content; close($fh); } @@ -51,8 +52,8 @@ sub set_tapelist { # methods are never invoked in this test. my $taperscan = Amanda::Taper::Scan->new( algorithm => "traditional", - changer => {}, # (not used) - tapelist_filename => $tapelist, + changer => undef, # (not used) + tapelist => $tapelist, tapecycle => 1, # will be changed periodically below labelstr => "TEST-[0-9]", autolabel => { 'template' => "TEST-%", @@ -140,3 +141,5 @@ ok(!$taperscan->is_reusable_volume(label => "TEST-2", new_label_ok => 0), " TEST ok(!$taperscan->is_reusable_volume(label => "TEST-3", new_label_ok => 0), " TEST-3 not reusable"); ok(!$taperscan->is_reusable_volume(label => "TEST-4", new_label_ok => 0), " TEST-4 not reusable"); +$taperscan->quit(); +