projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 3.2.0
[debian/amanda]
/
installcheck
/
Amanda_Changer_single.pl
diff --git
a/installcheck/Amanda_Changer_single.pl
b/installcheck/Amanda_Changer_single.pl
index 80da868e38ca9f63d0e17263af0a0948659a3427..f2c42cf5f4879e52651994789d59824f6df815c3 100644
(file)
--- 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
#
# 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 Test::More tests => 6;
use File::Path;
use strict;
+use warnings;
use lib "@amperldir@";
use Installcheck::Config;
use lib "@amperldir@";
use Installcheck::Config;
@@
-46,7
+47,8
@@
if ($cfg_result != $CFGERR_OK) {
die(join "\n", @errors);
}
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);
{
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);
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
"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,
$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");
type => 'failed',
reason => 'volinuse' },
"second simultaneous reservation rejected");