mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
PT-191 - add ssl options to DSN
- Updated ssl tests, so they test option --mysql_ssl and DSN
This commit is contained in:
@@ -30,7 +30,7 @@ elsif ( $sandbox_version lt '8.0' ) {
|
||||
plan skip_all => "Requires MySQL 8.0 or newer";
|
||||
}
|
||||
else {
|
||||
plan tests => 10;
|
||||
plan tests => 13;
|
||||
}
|
||||
|
||||
my ($output, $exit_code);
|
||||
@@ -88,6 +88,31 @@ like(
|
||||
"Zero chunk"
|
||||
);
|
||||
|
||||
($output, $exit_code) = full_output(
|
||||
sub { pt_table_sync::main('D=sakila,t=film',
|
||||
qw(--host 127.1 --port 12346 --user sha256_user),
|
||||
qw(--password sha256_user%password --mysql_ssl 1), @args) },
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
is(
|
||||
$exit_code,
|
||||
0,
|
||||
"No error for user, identified with caching_sha2_password with option --mysql_ssl"
|
||||
) or diag($output);
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection./,
|
||||
'No secure connection error with option --mysql_ssl'
|
||||
) or diag($output);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/WHERE \(`film_id` = 0\)/,
|
||||
"Zero chunk with option --mysql_ssl"
|
||||
);
|
||||
|
||||
# Prepare checksums table
|
||||
diag(`$trunk/bin/pt-table-checksum F=t/pt-archiver/samples/pt-191.cnf,h=127.1,P=12345,u=sha256_user,p=sha256_user%password,s=1 -d sakila --recursion-method=dsn=F=t/pt-archiver/samples/pt-191.cnf,D=test_ssl,t=dsns,h=127.0.0.1,P=12345,u=sha256_user,p=sha256_user%password,s=1 2>&1 >/dev/null`);
|
||||
|
||||
|
Reference in New Issue
Block a user