X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=installcheck%2Famcheckdump.pl;h=e4c28e7afc8134f7e005a900ef3734a1b8cc903b;hb=fd48f3e498442f0cbff5f3606c7c403d0566150e;hp=65919111ae49f191c7ee95402b78af17e8ae0c3d;hpb=96f35b20267e8b1a1c846d476f27fcd330e0b018;p=debian%2Famanda diff --git a/installcheck/amcheckdump.pl b/installcheck/amcheckdump.pl index 6591911..e4c28e7 100644 --- a/installcheck/amcheckdump.pl +++ b/installcheck/amcheckdump.pl @@ -1,4 +1,4 @@ -# Copyright (c) 2005-2008 Zmanda Inc. All Rights Reserved. +# Copyright (c) 2007,2008 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 @@ -13,13 +13,14 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# Contact information: Zmanda Inc, 465 S Mathlida Ave, Suite 300 +# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com use Test::More tests => 9; use lib "@amperldir@"; use Installcheck::Config; +use Installcheck::Dumpcache; use Installcheck::Run qw(run run_get run_err $diskname); use Amanda::Paths; @@ -40,9 +41,6 @@ like(run_err('amcheckdump', 'this-probably-doesnt-exist'), qr(could not open con # Now use a config with a vtape and without usetimestamps $testconf = Installcheck::Run::setup(); -$testconf->add_param('label_new_tapes', '"TESTCONF%%"'); -$testconf->add_param('usetimestamps', 'no'); -$testconf->add_dle("localhost $diskname installcheck-test"); $testconf->write(); ok(run('amcheckdump', 'TESTCONF'), @@ -50,8 +48,7 @@ ok(run('amcheckdump', 'TESTCONF'), like($Installcheck::Run::stdout, qr(could not find)i, "..but finds no dumps."); -BAIL_OUT("amdump failed") - unless run('amdump', 'TESTCONF'); +Installcheck::Dumpcache::load("notimestamps"); like(run_get('amcheckdump', 'TESTCONF'), qr(Validating), "amcheckdump succeeds, claims to validate something (usetimestamps=no)"); @@ -63,16 +60,9 @@ like(run_get('amcheckdump', 'TESTCONF', '-oorg=installcheck'), qr(Validating), "amcheckdump accepts '-o' options on the command line"); ## -# And a config with usetimestamps enabled +# Try with usetimestamps enabled -$testconf = Installcheck::Run::setup(); -$testconf->add_param('label_new_tapes', '"TESTCONF%%"'); -$testconf->add_param('usetimestamps', 'yes'); -$testconf->add_dle("localhost $diskname installcheck-test"); -$testconf->write(); - -BAIL_OUT("amdump failed") - unless run('amdump', 'TESTCONF'); +Installcheck::Dumpcache::load("basic"); like(run_get('amcheckdump', 'TESTCONF'), qr(Validating), "amcheckdump succeeds, claims to validate something (usetimestamps=yes)");