Skip to content

Commit d694a45

Browse files
committed
Skip mysql_native_password test when that isn't supported
It's disabled by default in MySQL 8.4, and entirely removed in 9.0
1 parent e0f5cd9 commit d694a45

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

spec/mysql2/client_spec.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,13 @@ def run_gc
10111011

10121012
it "should raise a Mysql2::Error::ConnectionError exception upon connection failure due to invalid credentials" do
10131013
expect do
1014-
new_client(host: 'localhost', username: 'asdfasdf8d2h', password: 'asdfasdfw42')
1014+
begin
1015+
new_client(host: 'localhost', username: 'asdfasdf8d2h', password: 'asdfasdfw42')
1016+
rescue Mysql2::Error => e
1017+
raise unless e.message.include?('mysql_native_password')
1018+
1019+
skip("Native password is not supported")
1020+
end
10151021
end.to raise_error(Mysql2::Error::ConnectionError)
10161022

10171023
expect do

0 commit comments

Comments
 (0)