Validate --max|critical-load (work in progress).

This commit is contained in:
Daniel Nichter
2012-05-25 12:15:11 -06:00
parent ed95534efa
commit bbe6125d8f
4 changed files with 79 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ BEGIN {
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Test::More tests => 6;
use Test::More tests => 8;
use PerconaTest;
@@ -58,6 +58,20 @@ like(
"Cannot --alter-foreign-keys-method=drop_swap with --no-drop-new-table"
);
$output = `$cmd h=127.1,P=12345,u=msandbox,p=msandbox,D=mysql,t=user --max-load 100 --alter "ENGINE=MyISAM" --dry-run`;
like(
$output,
qr/Invalid --max-load/,
"Validates --max-load"
);
$output = `$cmd h=127.1,P=12345,u=msandbox,p=msandbox,D=mysql,t=user --critical-load 100 --alter "ENGINE=MyISAM" --dry-run`;
like(
$output,
qr/Invalid --critical-load/,
"Validates --critical-load"
);
# #############################################################################
# Done.
# #############################################################################