PT-191 - add ssl options to DSN

- Updated ssl tests, so they test option --mysql_ssl and DSN
This commit is contained in:
Sveta Smirnova
2025-07-30 17:18:38 +03:00
parent 2bea8ac44b
commit 5100e9b1aa
19 changed files with 539 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ elsif ( $sandbox_version lt '8.0' ) {
plan skip_all => "Requires MySQL 8.0 or newer";
}
else {
plan tests => 11;
plan tests => 15;
}
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
@@ -102,6 +102,39 @@ like(
'Checksums the table (issue 388)'
);
($output, $exit_code) = full_output(
sub { pt_table_checksum::main(
@args,
qw(--host 127.1 --port 12345 --user sha256_user),
qw(--password sha256_user%password --mysql_ssl 1),
qw(-d test)) },
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);
unlike(
$output,
qr/Use of uninitialized value/,
'No error (issue 388) with option --mysql_ssl'
);
like(
$output,
qr/^\S+\s+0\s+0\s+1\s+0\s+1\s+/m,
'Checksums the table (issue 388) with option --mysql_ssl'
);
($output, $exit_code) = full_output(
sub {
pt_table_checksum::main(