Imported Upstream version 3.3.0
[debian/amanda] / installcheck / amserverconfig.pl
index 5b61ae3a3e8afd6f15a33fd04cf60d2f8d8f69b3..22e7c1818b010ac577fac5cf1d6f5e238bf72bff 100644 (file)
@@ -16,7 +16,7 @@
 # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
 
-use Test::More tests => 8;
+use Test::More tests => 10;
 
 use lib "@amperldir@";
 use File::Path;
@@ -45,19 +45,28 @@ sub config_ok {
 Installcheck::Run::cleanup();
 ok(run("$sbindir/amserverconfig", 'TESTCONF', '--template', 'S3'),
     "amserverconfig with S3 template")
-    or diag($Installcheck::Run::stderr);
+    or diag($Installcheck::Run::stdout);
 config_ok();
 
 Installcheck::Run::cleanup();
 ok(run("$sbindir/amserverconfig", 'TESTCONF', '--template', 'harddisk'),
     "amserverconfig with harddisk template")
-    or diag($Installcheck::Run::stderr);
+    or diag($Installcheck::Run::stdout);
+config_ok();
+
+Installcheck::Run::cleanup();
+mkpath(Installcheck::Run::vtape_dir());
+ok(run("$sbindir/amserverconfig", 'TESTCONF', '--template', 'harddisk',
+                   '--tapecycle', '2',
+                   '--tapedev', Installcheck::Run::vtape_dir()),
+    "amserverconfig with harddisk template and tapedev and tapecycle")
+    or diag($Installcheck::Run::stdout);
 config_ok();
 
 Installcheck::Run::cleanup();
 ok(run("$sbindir/amserverconfig", 'TESTCONF', '--template', 'single-tape'),
     "amserverconfig with single-tape template")
-    or diag($Installcheck::Run::stderr);
+    or diag($Installcheck::Run::stdout);
 config_ok();
 
 SKIP: {
@@ -66,7 +75,7 @@ SKIP: {
     Installcheck::Run::cleanup();
     ok(run("$sbindir/amserverconfig", 'TESTCONF', '--template', 'tape-changer'),
        "amserverconfig with tape-changer template")
-       or diag($Installcheck::Run::stderr);
+       or diag($Installcheck::Run::stdout);
     config_ok();
 }