X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2FAmanda_Changer_compat.pl;h=29c69525679ad53d5874eee78f6e47b15c16b418;hb=c4f19a4c1ce2b200d4e18c880257a4389bd5368c;hp=5d786d0a2d60894fc92f26338e3bbc43af467180;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/installcheck/Amanda_Changer_compat.pl b/installcheck/Amanda_Changer_compat.pl index 5d786d0..29c6952 100644 --- a/installcheck/Amanda_Changer_compat.pl +++ b/installcheck/Amanda_Changer_compat.pl @@ -1,4 +1,4 @@ -# Copyright (c) 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2008-2012 Zmanda, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 as published @@ -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);