rsyncd-formula/.travis.yml

35 lines
1007 B
YAML
Raw Normal View History

2015-05-15 00:05:21 +02:00
language: python
python:
- '2.7'
2015-05-15 00:42:55 +02:00
env:
global:
- BS_PIP_ALLOWED=1
- BS_ECHO_DEBUG=1
2015-05-15 00:51:56 +02:00
matrix:
- STATE=rsyncd
- STATE=rsyncd.config
2015-05-15 00:42:55 +02:00
2015-05-15 00:05:21 +02:00
before_install:
- sudo apt-get update
2015-05-15 00:42:55 +02:00
- curl -L http://bootstrap.saltstack.org | sudo -E sh -s -- stable
2015-05-15 00:05:21 +02:00
install:
- sudo mkdir -p /srv && sudo ln -sfn $PWD /srv/formula
2015-05-15 01:28:02 +02:00
# See what kind of travis box you're on to help with making your states
# compatible with travis
2015-05-15 00:05:21 +02:00
- sudo salt-call grains.items --local
script:
2015-05-15 00:51:56 +02:00
- sudo salt-call state.show_sls $STATE --local --retcode-passthrough --config-dir=test/etc
- sudo salt-call state.sls $STATE --local --retcode-passthrough --config-dir=test/etc
2015-05-15 01:28:02 +02:00
# For debugging purpose
- cat /etc/default/rsync
- cat /etc/rsyncd.conf
2015-05-15 01:28:02 +02:00
# Idempotence check
- sudo salt-call state.sls $STATE --local --retcode-passthrough --config-dir=test/etc > /tmp/second
- cat /tmp/second
- grep '^Not Run:' /tmp/second && { echo 'Idempotence check failed'; exit 1; } || { echo 'Imdempotence passes'; exit 0; }