inspec/.delivery/build-cookbook/recipes/unit.rb
Dominik Richter 3227624617 extend delivery tests to extra docker images
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-02 23:22:56 +02:00

22 lines
595 B
Ruby

#
# Cookbook Name:: build-cookbook
# Recipe:: unit
#
# Copyright (c) 2015 Chef Software Inc., All Rights Reserved.
# Author:: Dominik Richter
include_recipe 'build-cookbook::prepare'
home = node['delivery_builder']['repo']
{
'mock test resources' => 'rake test',
'test resources, main docker images' => 'rake test:resources config=test/test.yaml',
'test resources, extra docker images' => 'rake test:resources config=test/test-extra.yaml',
}.each do |title, test|
execute title do
command 'bundle exec '+test
cwd home
user node['delivery_builder']['build_user']
end
end