Skip to content

Commit

Permalink
Travis runs tests now (#188)
Browse files Browse the repository at this point in the history
Looks good.  Super green.
  • Loading branch information
Gerrrr authored and fusiondog committed May 26, 2017
1 parent d9147c5 commit af6f010
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion provision/consul-server.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af6f010

Please sign in to comment.