Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.

Commit

Permalink
add rake task for integration testing
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Münch <[email protected]>
  • Loading branch information
atomic111 committed Aug 3, 2016
1 parent 34144cf commit e0ebff8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
driver:
name: docker
privileged: true
use_sudo: false
provision_command:
- "mkdir /var/run/sshd"

transport:
max_ssh_sessions: 5

provisioner:
name: ansible_playbook
hosts: all
Expand Down
14 changes: 14 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/usr/bin/env rake
# encoding: utf-8

require 'foodcritic'
require 'rspec/core/rake_task'

# Rubocop before rspec so we don't lint vendored cookbooks
desc 'Run all tests except Kitchen (default task)'
task default: [:integration]

# Automatically generate a changelog for this project. Only loaded if
# the necessary gem is installed.
begin
Expand All @@ -9,3 +16,10 @@ begin
rescue LoadError
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
end

desc 'Run integration tests'
task :integration do
concurrency = ENV['CONCURRENCY'] || 1
os = ENV['OS'] || ''
sh('sh', '-c', "bundle exec kitchen test -c #{concurrency} #{os}")
end

0 comments on commit e0ebff8

Please sign in to comment.