forked from benthor/clustersql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (31 loc) · 2.17 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: go
go:
- tip
- 1.2
- 1.1
notifications:
email:
recipients:
- tkr@ecix.net
before_install:
- sudo apt-get install -y python-software-properties dtach
- sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
- sudo add-apt-repository 'deb http://mirror.netcologne.de/mariadb/repo/5.5/ubuntu precise main'
- sudo apt-get update
install:
- sudo apt-get install mariadb-galera-server galera -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
before_script:
- sudo mkdir -p /tmp/maria1 /tmp/maria2 /tmp/maria3
- sudo chown mysql:mysql /tmp/maria*
- sudo mysql_install_db --datadir=/tmp/maria1
- sudo mysql_install_db --datadir=/tmp/maria2
- sudo mysql_install_db --datadir=/tmp/maria3
- sudo dtach -n /tmp/maria1.soc mysqld --binlog-format=ROW --log-error=/tmp/maria1.log --wsrep-cluster-name="galeratest" --wsrep-cluster-address="gcomm://127.0.0.1:2001,127.0.0.2:2002,127.0.0.3:2003" --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-node-address=127.0.0.1:2001 --wsrep-node-name="maria1" --wsrep-sst-auth=root:hunter2 --wsrep-new-cluster --wsrep-provider-options="pc.bootstrap=true" --datadir=/tmp/maria1 --port=3301
- sudo dtach -n /tmp/maria2.soc mysqld --binlog-format=ROW --log-error=/tmp/maria2.log --wsrep-cluster-name="galeratest" --wsrep-cluster-address="gcomm://127.0.0.1:2001,127.0.0.2:2002,127.0.0.3:2003" --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-node-address=127.0.0.2:2002 --wsrep-node-name="maria2" --wsrep-sst-auth=root:hunter2 --datadir=/tmp/maria2 --port=3302
- sudo dtach -n /tmp/maria3.soc mysqld --binlog-format=ROW --log-error=/tmp/maria3.log --wsrep-cluster-name="galeratest" --wsrep-cluster-address="gcomm://127.0.0.1:2001,127.0.0.2:2002,127.0.0.3:2003" --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-node-address=127.0.0.3:2003 --wsrep-node-name="maria3" --wsrep-sst-auth=root:hunter2 --datadir=/tmp/maria3 --port=3303
- go get -v github.com/go-sql-driver/mysql
- go get -v github.com/BurntSushi/toml
- sleep 10
- sudo mysql -P 3301 -e "create database IF NOT EXISTS test;"
script:
- go test -v