X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2FAmanda_Changer_multi.pl;h=ae3466d8c8be065cf5588f5ba71d5682707b3568;hb=0ab9787cd7de76aad522ee8d55ed7e87e3047458;hp=4c666662c263ae333fa6ffdfeae10390d5795019;hpb=42ff24f2a525d5965e1841b2ebe3ee0f4b918ac6;p=debian%2Famanda diff --git a/installcheck/Amanda_Changer_multi.pl b/installcheck/Amanda_Changer_multi.pl index 4c66666..ae3466d 100644 --- a/installcheck/Amanda_Changer_multi.pl +++ b/installcheck/Amanda_Changer_multi.pl @@ -16,7 +16,7 @@ # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com -use Test::More tests => 18; +use Test::More tests => 19; use File::Path; use strict; use warnings; @@ -71,6 +71,7 @@ reset_taperoot(5); my $chg = Amanda::Changer->new("chg-multi:file:$taperoot/slot{0,1,2,3,4}"); die($chg) if $chg->isa("Amanda::Changer::Error"); +is($chg->have_inventory(), '1', "changer have inventory"); { my @slots = (); my @reservations = (); @@ -377,22 +378,27 @@ Amanda::MainLoop::run(); is_deeply($inv, [ { slot => 1, state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_DEVICE_ERROR, + device_error => "Error checking directory $taperoot/slot0/data/: No such file or directory", f_type => undef, label => undef, reserved => 0 }, { slot => 2, state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, + device_error => "File 0 not found", f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0 }, { slot => 3, state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, + device_error => "File 0 not found", f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0 }, { slot => 4, state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_SUCCESS, + device_error => undef, f_type => $Amanda::Header::F_TAPESTART, label => "FOO?BAR", reserved => 0, current => 1 }, { slot => 5, state => Amanda::Changer::SLOT_FULL, device_status => $DEVICE_STATUS_VOLUME_UNLABELED, + device_error => "File 0 not found", f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0 }, ], "inventory finds the labeled tape"); @@ -431,4 +437,5 @@ Amanda::MainLoop::run(); Amanda::MainLoop::run(); } +$chg->quit(); rmtree($taperoot);