Skip to content
This repository was archived by the owner on Apr 14, 2018. It is now read-only.

Commit 143dbbe

Browse files
committed
Merge pull request #4 from delphix/add-tk-tests-to-travis-gh
Add execution of Test Kitchen tests to ".travis.yml"
2 parents d2eb25b + 07ed753 commit 143dbbe

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.travis.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,29 @@ services:
1111

1212
before_install:
1313
- sudo apt-get update -qq
14-
- sudo apt-get install -qq python-apt
14+
- sudo apt-get install -qq python-apt ruby
1515

1616
install:
17-
- pip install ansible==1.9.2
17+
- pip install ansible==1.9.4
18+
- sudo gem install busser --no-ri --no-rdoc
19+
- sudo busser plugin install busser-bats
1820

1921
script:
2022
- echo localhost > inventory
2123
- ansible-galaxy install -r requirements-test.txt -p ../
2224
- ansible-playbook -i inventory --syntax-check test/integration/default/default.yml
2325
- ansible-playbook -i inventory --connection=local --sudo -vvvv test/integration/default/default.yml
24-
#
25-
# Run the role/playbook again, checking to make sure it's idempotent. Ansible
26-
# will always return "changed=2" because the "angstwad.docker_ubuntu" role uses
27-
# pip to update "docker-py" and "docker-compose" and the status returned from
28-
# pip is meaningless.
29-
#
26+
#
27+
# Run the role/playbook again, checking to make sure it's idempotent. Ansible
28+
# will always return "changed=2" because the "angstwad.docker_ubuntu" role uses
29+
# pip to update "docker-py" and "docker-compose" and the status returned from
30+
# pip is meaningless.
31+
#
3032
- >
3133
ansible-playbook -i inventory --connection=local --sudo -vvvv test/integration/default/default.yml
3234
| grep -q 'changed=2.*failed=0'
3335
&& (echo 'Idempotence test: pass' && exit 0)
3436
|| (echo 'Idempotence test: fail' && exit 1)
37+
38+
# Run the Test Kitchen tests.
39+
- sudo /opt/busser/vendor/bats/bin/bats ./test/integration/default/bats/*.bats

test/integration/default/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
lineinfile:
1515
dest=/etc/hosts
1616
state=present
17-
line="{{ ansible_eth0.ipv4.address }} registry.yourdomain.local"
17+
line="127.0.0.1 registry.yourdomain.local"
1818

1919
- hosts: all
2020
roles:

0 commit comments

Comments
 (0)