Merge pull request #9 from Martin819/master
Added Kitchen tests and Travis
diff --git a/.gitignore b/.gitignore
index aa8e42a..c9434e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,6 @@
*.swp
*.pyc
.ropeproject
+.kitchen
+.bundle
+.vendor
diff --git a/.kitchen.yml b/.kitchen.yml
index 903cfbf..d4dc31b 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -2,19 +2,18 @@
driver:
name: docker
hostname: ntp.ci.local
- #socket: tcp://127.0.0.1:2376
use_sudo: false
-
-
provisioner:
name: salt_solo
salt_install: bootstrap
salt_bootstrap_url: https://bootstrap.saltstack.com
salt_version: latest
require_chef: false
+ log_level: error
formula: ntp
- log_level: info
+ grains:
+ noservices: True
state_top:
base:
"*":
@@ -24,20 +23,16 @@
base:
"*":
- ntp
- grains:
- noservices: True
-
-
-platforms:
- - name: ubuntu-14.04
- - name: ubuntu-16.04
- - name: centos-7.1
-
verifier:
name: inspec
sudo: true
+platforms:
+ - name: <%=ENV['PLATFORM'] || 'ubuntu-xenial'%>
+ driver_config:
+ image: <%=ENV['PLATFORM'] || 'trevorj/salty-whales:xenial'%>
+ platform: ubuntu
suites:
@@ -50,5 +45,4 @@
provisioner:
pillars-from-files:
ntp.sls: tests/pillar/server.sls
-
# vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..4f34af2
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,40 @@
+sudo: required
+services:
+ - docker
+
+install:
+ - pip install PyYAML
+ - pip install virtualenv
+ - |
+ test -e Gemfile || cat <<EOF > Gemfile
+ source 'https://rubygems.org'
+ gem 'rake'
+ gem 'test-kitchen'
+ gem 'kitchen-docker'
+ gem 'kitchen-inspec'
+ gem 'inspec'
+ gem 'kitchen-salt', :git => 'https://github.com/salt-formulas/kitchen-salt.git'
+ - bundle install
+
+env:
+ - PLATFORM=trevorj/salty-whales:trusty
+ - PLATFORM=trevorj/salty-whales:xenial
+
+
+before_script:
+ - set -o pipefail
+ - make test | tail
+
+script:
+ - test ! -e .kitchen.yml || bundle exec kitchen test -t tests/integration
+
+notifications:
+ webhooks:
+ urls:
+ - https://webhooks.gitter.im/e/6123573504759330786b
+ on_success: change # options: [always|never|change] default: always
+ on_failure: never # options: [always|never|change] default: always
+ on_start: never # options: [always|never|change] default: always
+ on_cancel: never # options: [always|never|change] default: always
+ on_error: never # options: [always|never|change] default: always
+ email: false