Sha256: 70fc355af43e1acd26039e511a999dd7cab7766214ef9b38fb9299022658e188
Contents?: true
Size: 939 Bytes
Versions: 1
Compression:
Stored size: 939 Bytes
Contents
# frozen_string_literal: true require_relative "../integration_helper" class WrongSetupTest < Minitest::Test def assert_script_failed assert(!system("#{master_cut_script} 127.0.0.1:#{$mysql_master.port} 127.0.0.1:#{$mysql_slave.port} root -p ''")) end def test_wrong puts "testing cutover with incorrect master config..." $mysql_master.connection.query("set GLOBAL READ_ONLY=0") $mysql_slave.connection.query("set GLOBAL READ_ONLY=0") assert_script_failed puts "testing cutover with incorrect slave config..." $mysql_master.connection.query("set GLOBAL READ_ONLY=0") $mysql_slave.connection.query("set GLOBAL READ_ONLY=0") assert_script_failed puts "testing cutover with stopped slave" $mysql_master.connection.query("set GLOBAL READ_ONLY=0") $mysql_slave.connection.query("set GLOBAL READ_ONLY=1") $mysql_slave.connection.query("STOP SLAVE") assert_script_failed end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ar_mysql_flexmaster-1.0.3 | test/integration/wrong_setup_test.rb |