Sha256: 9c1ddcf4b567a0352d83e36791140d2dcd98d2aba36de037691144b0af5392a2

Contents?: true

Size: 1.21 KB

Versions: 13

Compression:

Stored size: 1.21 KB

Contents

# Mysql Isolated Servers -- a gem for testing mysql stuff

This gem provides functionality to quickly bring up and tear down mysql instances for the 
purposes of testing code against more advanced mysql topologies -- replication, vertical
partitions, etc.

I developed this as part of my testing strategy for implementing http://github.com/osheroff/ar_mysql_flexmaster, but it's 
been useful in developement of a couple of other projects too (http://github.com/osheroff/mmtop).

## Usage

```
$mysql_master = MysqlIsolatedServer.new(allow_output: false)
$mysql_master.boot!

puts "mysql master booted on port #{$mysql_master.port} -- access with mysql -uroot -h127.0.0.1 --port=#{$mysql_master.port} mysql"

$mysql_slave = MysqlIsolatedServer.new
$mysql_slave.boot!

puts "mysql slave booted on port #{$mysql_slave.port} -- access with mysql -uroot -h127.0.0.1 --port=#{$mysql_slave.port} mysql"

$mysql_slave_2 = MysqlIsolatedServer.new
$mysql_slave_2.boot!

puts "mysql chained slave booted on port #{$mysql_slave_2.port} -- access with mysql -uroot -h127.0.0.1 --port=#{$mysql_slave_2.port} mysql"

$mysql_slave.make_slave_of($mysql_master)
$mysql_slave_2.make_slave_of($mysql_slave)

$mysql_slave.set_rw(false)
sleep if __FILE__ == $0
```

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mysql_isolated_server-0.5.4 README.md
mysql_isolated_server-0.5.3 README.md
mysql_isolated_server-0.5.2 README.md
mysql_isolated_server-0.5.1 README.md
mysql_isolated_server-0.5.0 README.md
mysql_isolated_server-0.4.1 README.md
mysql_isolated_server-0.4.0 README.md
mysql_isolated_server-0.3.3 README.md
mysql_isolated_server-0.3.2 README.md
mysql_isolated_server-0.3.1 README.md
mysql_isolated_server-0.3.0 README.md
mysql_isolated_server-0.2.2 README.md
mysql_isolated_server-0.2.1 README.md