X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=installcheck%2FAmanda_Changer_single.pl;h=f2c42cf5f4879e52651994789d59824f6df815c3;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=80da868e38ca9f63d0e17263af0a0948659a3427;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/installcheck/Amanda_Changer_single.pl b/installcheck/Amanda_Changer_single.pl index 80da868..f2c42cf 100644 --- a/installcheck/Amanda_Changer_single.pl +++ b/installcheck/Amanda_Changer_single.pl @@ -1,4 +1,4 @@ -# Copyright (c) 2008,2009 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2008, 2009, 2010 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 @@ -19,6 +19,7 @@ use Test::More tests => 6; use File::Path; use strict; +use warnings; use lib "@amperldir@"; use Installcheck::Config; @@ -46,7 +47,8 @@ if ($cfg_result != $CFGERR_OK) { die(join "\n", @errors); } -my $chg = Amanda::Changer->new("chg-single:tape:/foo"); +my $chg = Amanda::Changer->new("chg-single:null:/foo"); +die "$chg" if $chg->isa("Amanda::Changer::Error"); { my ($held_res); @@ -72,7 +74,7 @@ my $chg = Amanda::Changer->new("chg-single:tape:/foo"); my ($err, $res) = @_; ok(!$err, "no error loading relative slot 'current'") or diag($err); - is($res->{'device'}->device_name(), 'tape:/foo', + is($res->{'device'}->device_name(), 'null:/foo', "returns correct device name"); $held_res = $res; # hang onto it while loading another slot @@ -84,7 +86,7 @@ my $chg = Amanda::Changer->new("chg-single:tape:/foo"); $got_second_res = make_cb('got_second_res' => sub { my ($err, $res) = @_; chg_err_like($err, - { message => qr{'tape:/foo' is already reserved}, + { message => qr{'null:/foo' is already reserved}, type => 'failed', reason => 'volinuse' }, "second simultaneous reservation rejected");