X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2Famtape.pl;h=cc7efd6e5a5bfb8093e27a6ab947cbb28aae13ab;hb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;hp=3a2beadb5be8a804de72e40e26e8f468fc5244d6;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/installcheck/amtape.pl b/installcheck/amtape.pl index 3a2bead..cc7efd6 100644 --- a/installcheck/amtape.pl +++ b/installcheck/amtape.pl @@ -1,4 +1,4 @@ -# Copyright (c) 2009 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 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 @@ -17,6 +17,8 @@ # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com use Test::More tests => 42; +use strict; +use warnings; use lib "@amperldir@"; use Installcheck::Config; @@ -69,7 +71,7 @@ sub setup_vtapes { 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); } @@ -213,7 +215,7 @@ like($Installcheck::Run::stderr, ok(run('amtape', 'TESTCONF', 'inventory'), "'amtape TESTCONF inventory'"); like($Installcheck::Run::stdout, - qr/slot +1: blank\nslot +2: label MyTape\nslot +3/, + qr/slot +1: blank\nslot +2: label MyTape \(current\)\nslot +3/, "..result correct"); ok(run('amtape', 'TESTCONF', 'taper'),