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

Commit e0ebff8

Browse files
committed
add rake task for integration testing
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent 34144cf commit e0ebff8

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.kitchen.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
22
driver:
33
name: docker
4+
privileged: true
45
use_sudo: false
56
provision_command:
67
- "mkdir /var/run/sshd"
78

8-
transport:
9-
max_ssh_sessions: 5
10-
119
provisioner:
1210
name: ansible_playbook
1311
hosts: all

Rakefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/usr/bin/env rake
22
# encoding: utf-8
33

4+
require 'foodcritic'
5+
require 'rspec/core/rake_task'
6+
7+
# Rubocop before rspec so we don't lint vendored cookbooks
8+
desc 'Run all tests except Kitchen (default task)'
9+
task default: [:integration]
10+
411
# Automatically generate a changelog for this project. Only loaded if
512
# the necessary gem is installed.
613
begin
@@ -9,3 +16,10 @@ begin
916
rescue LoadError
1017
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
1118
end
19+
20+
desc 'Run integration tests'
21+
task :integration do
22+
concurrency = ENV['CONCURRENCY'] || 1
23+
os = ENV['OS'] || ''
24+
sh('sh', '-c', "bundle exec kitchen test -c #{concurrency} #{os}")
25+
end

0 commit comments

Comments
 (0)