X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=installcheck%2FAmanda_Changer_disk.pl;h=c5b144baf4c0e1d48784d185a8d2e184bd35abbf;hb=refs%2Ftags%2Fupstream%2F3.3.1;hp=993ee6f004390390b044b7577ac7597136da28db;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/installcheck/Amanda_Changer_disk.pl b/installcheck/Amanda_Changer_disk.pl index 993ee6f..c5b144b 100644 --- a/installcheck/Amanda_Changer_disk.pl +++ b/installcheck/Amanda_Changer_disk.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; @@ -84,6 +84,7 @@ chg_err_like($chg, $chg = Amanda::Changer->new("chg-disk:$taperoot"); die($chg) if $chg->isa("Amanda::Changer::Error"); +is($chg->have_inventory(), '1', "changer have inventory"); sub test_reserved { my ($finished_cb, @slots) = @_; @@ -392,15 +393,15 @@ Amanda::MainLoop::run(); is_deeply($inv, [ { slot => 1, state => Amanda::Changer::SLOT_FULL, - device_status => $DEVICE_STATUS_SUCCESS, + device_status => $DEVICE_STATUS_VOLUME_UNLABELED, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0, current => 1}, { slot => 2, state => Amanda::Changer::SLOT_FULL, - device_status => $DEVICE_STATUS_SUCCESS, + device_status => $DEVICE_STATUS_VOLUME_UNLABELED, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0 }, { slot => 3, state => Amanda::Changer::SLOT_FULL, - device_status => $DEVICE_STATUS_SUCCESS, + device_status => $DEVICE_STATUS_VOLUME_UNLABELED, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0 }, { slot => 4, state => Amanda::Changer::SLOT_FULL, @@ -408,7 +409,7 @@ Amanda::MainLoop::run(); f_type => $Amanda::Header::F_TAPESTART, label => "FOO?BAR", reserved => 0 }, { slot => 5, state => Amanda::Changer::SLOT_FULL, - device_status => $DEVICE_STATUS_SUCCESS, + device_status => $DEVICE_STATUS_VOLUME_UNLABELED, f_type => $Amanda::Header::F_EMPTY, label => undef, reserved => 0 }, ], "inventory finds the labeled tape"); @@ -421,4 +422,5 @@ Amanda::MainLoop::run(); Amanda::MainLoop::run(); } +$chg->quit(); rmtree($taperoot);