Skip to content

Commit

Permalink
run kitchen tests in travis/docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mwrock committed Sep 24, 2016
1 parent 472e2a3 commit b030042
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .kitchen.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
driver:
name: docker
username: vagrant
provision_command:
- usermod -p $(echo vagrant | openssl passwd -1 -stdin) vagrant
- locale-gen en_US.UTF-8
- dpkg-reconfigure locales

provisioner:
name: nodes
roles_path: test/fixtures/roles
require_chef_omnibus: latest

platforms:
- name: ubuntu-14.04

suites:
- name: node1
run_list:
- role[test_role]
- recipe[node-tests::node1]
attributes:
consul:
config:
bootstrap_expect: 2
server: true

- name: node2
run_list:
- recipe[node-tests::node2]
attributes:
consul:
config:
bootstrap_expect: 2
server: true
19 changes: 16 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
language: ruby

rvm:
- 2.3.1
- ruby-head
matrix:
include:
- rvm: 2.3.1
- rvm: ruby-head
- rvm: 2.3.1
services: docker
sudo: required
before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
script:
- bundle exec kitchen verify
after_failure:
- cat .kitchen/logs/kitchen.log
env:
- UBUNTU=14.04
- KITCHEN_YAML=.kitchen.travis.yml

branches:
only:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

gemspec

gem 'test-kitchen', '~> 1.6'
gem 'kitchen-vagrant'
gem 'kitchen-docker'
gem 'berkshelf'
gem 'chef'
gem 'winrm-fs', '~> 0.3'
gem 'winrm-fs', '~> 1.0'
2 changes: 1 addition & 1 deletion kitchen-nodes.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|

spec.add_dependency 'net-ping'
spec.add_dependency 'win32-security'
spec.add_dependency 'test-kitchen', '~> 1.4'
spec.add_dependency 'test-kitchen', '~> 1.13'

This comment has been minimized.

Copy link
@legal90

legal90 Nov 3, 2016

Contributor

@mwrock could you please elaborate why the version constraint for test-kitchen has been bumped here?
It makes kitchen-nodes not working with older Kitchen versions (see #29 (comment))

This comment has been minimized.

Copy link
@mwrock

mwrock Nov 3, 2016

Author Owner

sure. The reason is that Test-Kitchen bumped its winrm dependency which broke kitchen-nodes monkey patch. So kitchen-nodes was updated to work with the newer test-kitchen. The best course of action if you need to use an older test-kitchen is to pin to an older kitchen-nodes.


spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'fakefs', '~> 0.4'
Expand Down

0 comments on commit b030042

Please sign in to comment.