Travis runs tests now (#188)

Looks good.  Super green.
This commit is contained in:
Aleksandr Sorokoumov 2017-05-26 21:57:49 +02:00 committed by fusiondog
parent d9147c5624
commit af6f010363
3 changed files with 16 additions and 6 deletions

View File

@ -1,7 +1,14 @@
language: go
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-pip python-apt
- sudo pip install ansible
# the playbook and the test require "192.168.10.10" ip address
- sudo ifconfig eth0:1 192.168.10.10 netmask 255.255.255.0 up
install:
- go get github.com/AcalephStorage/consul-alerts/Godeps/_workspace/src/github.com/Sirupsen/logrus
- go get github.com/AcalephStorage/consul-alerts/Godeps/_workspace/src/github.com/docopt/docopt-go
- go get github.com/AcalephStorage/consul-alerts/Godeps/_workspace/src/github.com/imdario/mergo
- go get github.com/AcalephStorage/consul-alerts/Godeps/_workspace/src/github.com/mitchellh/hashstructure
- go get github.com/aws/aws-sdk-go/aws
- "ansible-playbook -i 'localhost,' -c local provision/site.yml -e \"{'ansible_eth1': {'ipv4': {'address': '192.168.10.10'}}}\" -e bootstrap_expect=1"
- go get -v -t ./...
script:
- make test

3
Vagrantfile vendored
View File

@ -17,6 +17,9 @@ Vagrant.configure(2) do |config|
config.vm.provision :ansible do |ansible|
ansible.playbook = 'provision/site.yml'
ansible.extra_vars = {
bootstrap_expect: 3
}
end
end

View File

@ -8,7 +8,7 @@ stop on starting shutdown
export GOMAXPROCS=`nproc`
# Needed on first server -bootstrap
exec /usr/local/bin/consul agent -server -bootstrap-expect 3 -config-dir /etc/consul.d -data-dir /var/lib/consul -ui-dir /opt/consul/ui -bind {{ ansible_eth1.ipv4.address }} -client 0.0.0.0
exec /usr/local/bin/consul agent -server -bootstrap-expect {{ bootstrap_expect }} -config-dir /etc/consul.d -data-dir /var/lib/consul -ui-dir /opt/consul/ui -bind {{ ansible_eth1.ipv4.address }} -client 0.0.0.0
respawn
respawn limit 10 10