mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-24 02:01:42 +08:00
Add failing test.
This commit is contained in:
@@ -23,11 +23,7 @@ my $dbh = $sb->get_dbh_for('master');
|
|||||||
if ( !$dbh ) {
|
if ( !$dbh ) {
|
||||||
plan skip_all => 'Cannot connect to sandbox master';
|
plan skip_all => 'Cannot connect to sandbox master';
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
plan tests => 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sb->wipe_clean($dbh);
|
|
||||||
$sb->create_dbs($dbh, [qw(test)]);
|
$sb->create_dbs($dbh, [qw(test)]);
|
||||||
|
|
||||||
my $output;
|
my $output;
|
||||||
@@ -120,9 +116,34 @@ like(
|
|||||||
$dbh->do('DROP TABLE test.child');
|
$dbh->do('DROP TABLE test.child');
|
||||||
$dbh->do('DROP TABLE test.parent');
|
$dbh->do('DROP TABLE test.parent');
|
||||||
|
|
||||||
|
# #############################################################################
|
||||||
|
# pt-fk-error-logger crashes if there's no foreign key error
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/1075773
|
||||||
|
# #############################################################################
|
||||||
|
diag(`$trunk/sandbox/stop-sandbox 12348 >/dev/null`);
|
||||||
|
diag(`$trunk/sandbox/start-sandbox master 12348 >/dev/null`);
|
||||||
|
diag(`/tmp/12348/use -e "create database test"`);
|
||||||
|
$sb->load_file('master1', 't/pt-fk-error-logger/samples/fke_tbl.sql', 'test');
|
||||||
|
|
||||||
|
$output = output(
|
||||||
|
sub {
|
||||||
|
pt_fk_error_logger::main('h=127.1,P=12348,u=msandbox,p=msandbox',
|
||||||
|
'--dest', 'h=127.1,P=12348,D=test,t=foreign_key_errors')
|
||||||
|
},
|
||||||
|
stderr => 1,
|
||||||
|
);
|
||||||
|
|
||||||
|
is(
|
||||||
|
$output,
|
||||||
|
"",
|
||||||
|
"No foreign key errors, no errors and no output (bug 1075773)"
|
||||||
|
);
|
||||||
|
|
||||||
|
diag(`$trunk/sandbox/stop-sandbox 12348 >/dev/null`);
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
$sb->wipe_clean($dbh);
|
$sb->wipe_clean($dbh);
|
||||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||||
exit;
|
done_testing;
|
||||||
|
|||||||
Reference in New Issue
Block a user