mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-21 19:34:52 +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:
@@ -39,6 +39,7 @@ $sb->do_as_root(
|
||||
'source',
|
||||
q/CREATE USER IF NOT EXISTS sha256_user@'%' IDENTIFIED WITH caching_sha2_password BY 'sha256_user%password' REQUIRE SSL/,
|
||||
q/GRANT ALL ON sakila.* TO sha256_user@'%'/,
|
||||
q/GRANT ALL ON test.* TO sha256_user@'%'/,
|
||||
);
|
||||
|
||||
# This query doesn't use indexes so there's an unused PK and
|
||||
@@ -95,6 +96,46 @@ like(
|
||||
'A simple query that does not use any indexes',
|
||||
) or diag($output);
|
||||
|
||||
($output, $exit_code) = full_output(
|
||||
sub {
|
||||
pt_index_usage::main(
|
||||
@args,
|
||||
qw(--host=127.1 --port=12345 --user=sha256_user --password=sha256_user%password --mysql_ssl=1),
|
||||
qw(--create-save-results-database),
|
||||
'--save-results-database=h=127.1,P=12345,u=sha256_user,p=sha256_user%password,s=1,D=test',
|
||||
"$trunk/$samples/slow001.txt")
|
||||
},
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
is(
|
||||
$exit_code,
|
||||
0,
|
||||
"No error for user, identified with caching_sha2_password via DSN"
|
||||
) or diag($output);
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection./,
|
||||
'No secure connection error with DSN'
|
||||
) or diag($output);
|
||||
|
||||
$output = `/tmp/12345/use -N -e "SHOW TABLES FROM test"`;
|
||||
|
||||
my $expected = <<EOF;
|
||||
index_alternatives
|
||||
index_usage
|
||||
indexes
|
||||
queries
|
||||
tables
|
||||
EOF
|
||||
|
||||
is(
|
||||
$output,
|
||||
$expected,
|
||||
'Results are saved'
|
||||
) or diag($output);
|
||||
|
||||
@args = ('-F', "$trunk/t/pt-archiver/samples/pt-191.cnf");
|
||||
($output, $exit_code) = full_output(
|
||||
sub {
|
||||
|
Reference in New Issue
Block a user