Commit 06bb265c authored by Tim Smith's avatar Tim Smith
Browse files

Create a single test suite to speed up testing


Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent dcded913
......@@ -26,11 +26,9 @@ platforms:
box: chef/sles-12-sp1-x86_64 # private box
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: ubuntu-18.04
suites:
- name: default
run_list:
- recipe[test::default]
- name: manage
run_list:
- recipe[test::manage]
sudo: required
dist: trusty
addons:
apt:
......@@ -29,7 +28,7 @@ env:
- INSTANCE=default-ubuntu-1804 CHEF_VERSION=13
- INSTANCE=default-opensuse-leap CHEF_VERSION=13
- INSTANCE=default-amazonlinux CHEF_VERSION=13
- INSTANCE=default-amazonlinux-2 CHEF_VERSION=13
- INSTANCE=default-amazonlinux-2 CHEF_VERSION=13
- INSTANCE=manage-centos-7 CHEF_VERSION=13
- INSTANCE=default-centos-6
- INSTANCE=default-centos-7
......
#
# Cookbook:: test
# Recipe:: test
# Recipe:: default
#
# Copyright:: 2008-2018, Chef Software, Inc
#
......@@ -17,10 +17,14 @@
# limitations under the License.
#
apt_update 'update'
apt_update
include_recipe 'cron'
####################
# Test the resource
####################
# create a file with periods as if the older version of this cookbook raspbian
# the provider should clean it up and we'll test that it doesn't exists
file '/etc/cron.d/job.with.periods' do
......@@ -115,3 +119,19 @@ end
cron_d 'delete_cron' do
action :delete
end
#####################
# Test the definition
#####################
cron_manage 'alice' do
action :allow
end
cron_manage 'bob' do
action :allow
end
cron_manage 'tom' do
action :allow
end
apt_update 'update'
include_recipe 'cron'
cron_manage 'alice' do
action :allow
end
cron_manage 'bob' do
action :allow
end
cron_manage 'tom' do
action :allow
end
......@@ -42,3 +42,7 @@ else
it { should_not exist }
end
end
describe file('/etc/cron.allow') do
its('content') { should match /alice/ }
end
describe file('/etc/cron.allow') do
its('content') { should match /alice/ }
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment