Merge pull request #1039 from percona/PT-2498_pt-sift_does_not_work_starting_from_version_3.7.0

PT-2498 - pt-sift does not work starting from version 3.7.0
This commit is contained in:
Sveta Smirnova
2025-12-03 16:34:03 +03:00
committed by GitHub
2 changed files with 67 additions and 2 deletions

View File

@@ -9,11 +9,29 @@ BEGIN {
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Test::More tests => 1;
use Test::More tests => 2;
use PerconaTest;
pass();
my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/;
my $output = `$trunk/bin/$tool $trunk/bin 2>&1`;
# https://perconadev.atlassian.net/browse/PT-2498
# We do not test interactive tool here
# But we at least ensure it works and prints
# proper error message if called without correct path
isnt(
$?,
0,
"Error for the directory that does not contain pt-stalk files"
) or diag($output);
like(
$output,
qr/Error: There are no pt-stalk files in $trunk\/bin/,
"Correct error message"
) or diag($output);
# #############################################################################
# Done.