X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=installcheck%2Famlabel.pl;h=92f45346672a19cbba4d103ecc1334615b08f4af;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=fd5be1dab48ee0bfa9d6223cbef85592e61b9085;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/installcheck/amlabel.pl b/installcheck/amlabel.pl index fd5be1d..92f4534 100644 --- a/installcheck/amlabel.pl +++ b/installcheck/amlabel.pl @@ -17,6 +17,8 @@ # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com use Test::More tests => 19; +use strict; +use warnings; use lib "@amperldir@"; use Installcheck::Config; @@ -58,7 +60,7 @@ $dev->finish() or BAIL_OUT("device error"); my $tlf = Amanda::Config::config_dir_relative(getconf($CNF_TAPELIST)); -my $tl = Amanda::Tapelist::read_tapelist($tlf); +my $tl = Amanda::Tapelist->new($tlf, 1); $tl->add_tapelabel("0", "TESTCONF13", "test tape"); $tl->write($tlf); @@ -74,8 +76,8 @@ like(run_get('amlabel', 'TESTCONF', 'TESTCONF92'), qr/Writing label 'TESTCONF92'/, "amlabel labels the current slot by default"); -$tl = Amanda::Tapelist::read_tapelist($tlf); -is_deeply($tl->[0], { +$tl->reload(); +is_deeply($tl->{'tles'}->[0], { 'reuse' => 1, 'comment' => undef, 'position' => 1,