Skip to content

Commit

Permalink
Add failing test for caching_sha2_password auth
Browse files Browse the repository at this point in the history
Reproduction for #26
  • Loading branch information
composerinteralia committed Oct 4, 2022
1 parent 41dd1aa commit 824af70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/ruby/test/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ def test_trilogy_connect_with_native_password_auth_switch
ensure_closed client
end

def test_trilogy_connect_with_caching_sha2_password_auth_switch
client = new_tcp_client username: "caching_sha2", password: "password"
refute_nil client
ensure
ensure_closed client
end

def test_trilogy_connect_tcp_fixnum_port
assert_raises TypeError do
new_tcp_client port: "13306"
Expand Down
3 changes: 3 additions & 0 deletions docker-entrypoint-initdb.d/caching_sha2_password_user.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE USER 'caching_sha2'@'%';
GRANT ALL PRIVILEGES ON test.* TO 'caching_sha2'@'%';
ALTER USER 'caching_sha2'@'%' IDENTIFIED WITH caching_sha2_password BY 'password';

0 comments on commit 824af70

Please sign in to comment.