lintian doesn't like orphan packages with uploaders...
[debian/amanda] / installcheck / Amanda_Changer_compat.pl
index fc6d9ad0831054bd3979720bb310ffc77484389a..8997e9171704af35b6241d15833472b921bf39c8 100644 (file)
@@ -1,8 +1,9 @@
-# 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
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -16,7 +17,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 +198,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,
@@ -346,6 +349,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 +448,7 @@ die($chg) if $chg->isa("Amanda::Changer::Error");
     $get_info->();
     Amanda::MainLoop::run();
 }
+$chg->quit();
 
 # test two simultaneous invocations of info()
 
@@ -534,6 +539,7 @@ sub test_except_slots {
 }
 test_except_slots(\&Amanda::MainLoop::quit);
 Amanda::MainLoop::run();
+$chg->quit();
 
 unlink($changer_filename);
 unlink($result_file);