X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2FAmanda_Changer_compat.pl;h=b2e311e13f60ff4dd1a20db2387150e86f67ba98;hb=377e15b597bafb8e7c2a100f11a0166f7220fe1c;hp=5d786d0a2d60894fc92f26338e3bbc43af467180;hpb=d5853102f67d85d8e169f9dbe973ad573306c215;p=debian%2Famanda diff --git a/installcheck/Amanda_Changer_compat.pl b/installcheck/Amanda_Changer_compat.pl index 5d786d0..b2e311e 100644 --- a/installcheck/Amanda_Changer_compat.pl +++ b/installcheck/Amanda_Changer_compat.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 => 30; +use Test::More tests => 31; use File::Path; use strict; use warnings; @@ -197,6 +197,8 @@ if ($cfg_result != $CFGERR_OK) { my $chg = Amanda::Changer->new(); die($chg) if $chg->isa("Amanda::Changer::Error"); +is($chg->have_inventory(), '', "changer have inventory"); + try_run_changer( sub { $chg->load(label => 'TAPE-01', res_cb => $check_res_cb); }, undef, @@ -337,7 +339,7 @@ try_run_changer( ## check chg-disk # Installcheck::Run sets up the whole chg-disk thing for us -$testconf = Installcheck::Run->setup(); +$testconf = Installcheck::Run::setup(); $testconf->write(); $cfg_result = config_init($CONFIG_INIT_EXPLICIT_NAME, 'TESTCONF'); @@ -346,6 +348,7 @@ if ($cfg_result != $CFGERR_OK) { die(join "\n", @errors); } +$chg->quit(); $chg = Amanda::Changer->new(); die($chg) if $chg->isa("Amanda::Changer::Error"); @@ -444,6 +447,7 @@ die($chg) if $chg->isa("Amanda::Changer::Error"); $get_info->(); Amanda::MainLoop::run(); } +$chg->quit(); # test two simultaneous invocations of info() @@ -534,6 +538,7 @@ sub test_except_slots { } test_except_slots(\&Amanda::MainLoop::quit); Amanda::MainLoop::run(); +$chg->quit(); unlink($changer_filename); unlink($result_file);