Browse Source

Merge pull request #4 from Martin819/master

Added Kitchen tests and Travis
pull/5/head
Filip Pytloun 7 years ago
parent
commit
9de11c6172
2 changed files with 72 additions and 0 deletions
  1. +43
    -0
      .kitchen.yml
  2. +29
    -0
      .travis.yml

+ 43
- 0
.kitchen.yml View File

@@ -0,0 +1,43 @@
---
driver:
name: docker
hostname: iptables.ci.local
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: iptables
grains:
noservices: True
state_top:
base:
"*":
- iptables
pillars:
top.sls:
base:
"*":
- iptables

verifier:
name: inspec
sudo: true

platforms:
- name: <%=ENV['PLATFORM'] || 'ubuntu-xenial'%>
driver_config:
image: <%=ENV['PLATFORM'] || 'trevorj/salty-whales:xenial'%>
platform: ubuntu

suites:

- name: iptables_server
provisioner:
pillars-from-files:
iptables.sls: tests/pillar/iptables_server.sls
# vim: ft=yaml sw=2 ts=2 sts=2 tw=125

+ 29
- 0
.travis.yml View File

@@ -0,0 +1,29 @@
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/epcim/kitchen-salt.git', :branch => 'dependencis-pkg-repo2'
#Waiting for PR#78
#gem 'kitchen-salt', '>=0.2.25'
- bundle install

env:
- PLATFORM=trevorj/salty-whales:trusty
- PLATFORM=trevorj/salty-whales:xenial

before_script:
- make test | tail

script:
- test ! -e .kitchen.yml || bundle exec kitchen test -t tests/integration

Loading…
Cancel
Save