mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
pt-slave-find added --resolve-address option
This commit is contained in:
@@ -43,7 +43,7 @@ elsif ( !$slave2_dbh ) {
|
||||
plan skip_all => 'Cannot connect to second sandbox slave';
|
||||
}
|
||||
else {
|
||||
plan tests => 9;
|
||||
plan tests => 10;
|
||||
}
|
||||
|
||||
my @args = ('h=127.0.0.1,P=12345,u=msandbox,p=msandbox');
|
||||
@@ -67,6 +67,17 @@ my $expected = <<EOF;
|
||||
EOF
|
||||
is($output, $expected, 'Master with slave and slave of slave');
|
||||
|
||||
###############################################################################
|
||||
# Test --resolve-hostname option (we don't know the hostname of the test
|
||||
# machine so we settle for any non null string)
|
||||
###############################################################################
|
||||
$output = `$trunk/bin/pt-slave-find -h 127.0.0.1 -P 12345 -u msandbox -p msandbox --report-format hostname --resolve-address`;
|
||||
like (
|
||||
$output,
|
||||
qr/127\.0\.0\.1:12345\s+\(\w+\)/s,
|
||||
"--resolve-address option"
|
||||
) or diag($output);
|
||||
|
||||
# #############################################################################
|
||||
# Until MasterSlave::find_slave_hosts() is improved to overcome the problems
|
||||
# with SHOW SLAVE HOSTS, this test won't work.
|
||||
@@ -146,6 +157,7 @@ ok(
|
||||
"Summary report format",
|
||||
);
|
||||
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
Reference in New Issue
Block a user