Sha256: dc6fc7a7d54bebcaf55b909d252ab2d6b230d7d7563368ebf60d1b7033a23270
Contents?: true
Size: 937 Bytes
Versions: 9
Compression:
Stored size: 937 Bytes
Contents
describe "ProxySQL integration" do it "Should contact the writer" do conn = Mysql2::Client.new( host: '127.0.0.1', username: "writer", password: "password", port: "33005", ) assert_equal conn.query("SELECT @@global.hostname as host").each.first["host"], "mysql-1" end it "Should contact the reader" do conn = Mysql2::Client.new( host: '127.0.0.1', username: "reader", password: "password", port: "33005", ) assert_equal conn.query("SELECT @@global.hostname as host").each.first["host"], "mysql-2" end it "Should override default hostgroup from user if rule matches" do conn = Mysql2::Client.new( host: '127.0.0.1', username: "reader", password: "password", port: "33005", ) assert_equal conn.query("SELECT @@global.hostname as host #{Lhm::ProxySQLHelper::ANNOTATION}").each.first["host"], "mysql-1" end end
Version data entries
9 entries across 9 versions & 2 rubygems